Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with saving the relation view #14009

Closed
BloomCake opened this Issue Feb 14, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@BloomCake
Copy link

BloomCake commented Feb 14, 2018

Steps to reproduce

  1. Open the Relation View of a table
  2. Save your settings

Expected behaviour

The Foreign key constraints should be saved without error.

Actual behaviour

I get a error message in phpmyadmin
Error in processing request Error code: 500 Error text: error (rejected) It seems that the connection to server has been lost. Please check your network connectivity and server status.

and an error in the nginx log
2018/02/14 11:26:34 [error] 1050#1050: *3617 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Cannot unset string offsets in /opt/phpmyadmin/libraries/classes/Table.php:2307 Stack trace: #0 /opt/phpmyadmin/libraries/classes/Controllers/Table/TableRelationController.php(252): PhpMyAdmin\Table->updateForeignKeys(Array, Array, Array, Array, Array, 'duplicity', Array) #1 /opt/phpmyadmin/libraries/classes/Controllers/Table/TableRelationController.php(126): PhpMyAdmin\Controllers\Table\TableRelationController->updateForForeignKeysAction() #2 /opt/phpmyadmin/tbl_relation.php(70): PhpMyAdmin\Controllers\Table\TableRelationController->indexAction() #3 {main} thrown in /opt/phpmyadmin/libraries/classes/Table.php on line 2307" while reading response header from upstream, client: 10.8.0.42, server: db1.server.com, request: "POST /tbl_relation.php HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.1-fpm.sock:", host: "db1.server.com"

On another server with the same setup and the phpmyadmin version 4.2.12deb2+deb8u2 it works fine without errors.

Server configuration

Operating system: Ubuntu 16.04.3 LTS

Web server: NGINX (1.10.3 (Ubuntu))

Database: MariaDB-10.2.12

PHP version: 7.1.14-1

phpMyAdmin version: 4.8.0-dev (Git revision: 095c3a8)

Client configuration

Browser: Google Chrome (62.0.3202.62)

Operating system: Ubuntu 17.10

@shucon

This comment has been minimized.

Copy link
Contributor

shucon commented Feb 14, 2018

I'm starting to work on this.

@shucon shucon referenced this issue Feb 14, 2018

Closed

Fix broken Relation View #14010

4 of 4 tasks complete
@shucon

This comment has been minimized.

Copy link
Contributor

shucon commented Feb 22, 2018

Related to #13941

@mauriciofauth mauriciofauth self-assigned this Mar 27, 2018

@mauriciofauth mauriciofauth added the bug label Mar 27, 2018

@mauriciofauth mauriciofauth modified the milestone: 4.8.1 Mar 27, 2018

mauriciofauth added a commit that referenced this issue Mar 27, 2018

Fixes error in foreign key sql generation + drop foreign key contraint (
#14031)

* Fixes error in foreign key sql genration, issue #14030
Changed:
	templates/table/relation/foreign_key_row.twig
The destination_column_names were getting passed as a 1d array, the names when extracted gave a string. Passing it as a 2d array (see templates/table/relation/foreign_key_row.twig lines 123,133) fixes the issue.

Sign-Off-By: Lakshay arora (b16060@students.iitmandi.ac.in)

* Fixes error in foreign key sql generation + drop foreign key contraint, issue #14030
Changed:
	templates/table/relation/foreign_key_row.twig

Fix #13941
Fix #14009
Close #14037
Close #14010

Signed-off-by: Lakshay arora <b16060@students.iitmandi.ac.in>
(cherry picked from commit 00b5962)
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.