DeuxHuitHuit / multilingual_field

Multilingual Textbox field for Symphony CMS
http://symphonyextensions.com/extensions/multilingual_field/
Other
12 stars 13 forks source link

Fatal error when updating from Symphony 2.6.9 #78

Closed mprofitlich closed 7 years ago

mprofitlich commented 7 years ago

I updated Symphony CMS to 2.7.0 and switched to PHP 7. When updating the multilingual text box field, I get a fatal error:

Symphony Fatal Error: Call to undefined method Extension_TextBoxField::updateHasUniqueKey()

An error occurred in /var/www/vhosts/profitlich.ch/httpdocs/extensions/multilingual_field/extension.driver.php around line 141
136 if (!$textboxExt->updateHasColumn('handle_unique', self::FIELD_TABLE)) {
137 $textboxExt->updateAddColumn('handle_unique', "ENUM('yes', 'no') NOT NULL DEFAULT 'yes' AFTER `text_handle`", self::FIELD_TABLE);
138 }
139
140 // add field_id unique key
141 if ($textboxExt->updateHasColumn('field_id', self::FIELD_TABLE) && !$textboxExt->updateHasUniqueKey('field_id', self::FIELD_TABLE)) {
142 $textboxExt->updateAddUniqueKey('field_id', self::FIELD_TABLE);
143 }
144
145 // add entry_id unique key 

Backtrace
[/var/www/vhosts/profitlich.ch/httpdocs/symphony/lib/toolkit/class.extensionmanager.php:367]
    Extension_Multilingual_Field->update();
[/var/www/vhosts/profitlich.ch/httpdocs/symphony/content/content.systemextensions.php:284]
    ExtensionManager::enable();
[/var/www/vhosts/profitlich.ch/httpdocs/symphony/lib/toolkit/class.administrationpage.php:793]
    contentSystemExtensions->__actionIndex();
[/var/www/vhosts/profitlich.ch/httpdocs/symphony/lib/toolkit/class.administrationpage.php:756]
    AdministrationPage->__switchboard();
[/var/www/vhosts/profitlich.ch/httpdocs/symphony/lib/toolkit/class.administrationpage.php:459]
    AdministrationPage->action();
[/var/www/vhosts/profitlich.ch/httpdocs/symphony/lib/core/class.administration.php:205]
    AdministrationPage->build();
[/var/www/vhosts/profitlich.ch/httpdocs/symphony/lib/core/class.administration.php:483]
    Administration->__buildPage();
[/var/www/vhosts/profitlich.ch/httpdocs/symphony/lib/boot/func.utilities.php:253]
    Administration->display();
[/var/www/vhosts/profitlich.ch/httpdocs/symphony/lib/boot/func.utilities.php:235]
    symphony_launcher();
[/var/www/vhosts/profitlich.ch/httpdocs/index.php:19]
    symphony();

Database Query Log
[0.0004] SET character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8';
[0.0001] SET CHARACTER SET 'utf8';
[0.0001] SET time_zone = '+02:00';
[0.0003] SELECT SQL_CACHE t1.name, t2.page, t2.delegate, t2.callback FROM `sym_extensions` as t1 INNER JOIN `sym_extensions_delegates` as t2 ON t1.id = t2.extension_id WHERE t1.status = 'enabled' ORDER BY t2.delegate, t1.name;
[0.0003] SELECT SQL_CACHE `name` FROM `sym_extensions` WHERE `status` = 'enabled';
[0.0002] SELECT SQL_CACHE `session_data` FROM `sym_sessions` WHERE `session` = 'buo56o3qjb90ak8kn17dk14425' LIMIT 1;
[0.0002] SELECT SQL_CACHE * FROM `sym_extensions`;
[0.0003] SELECT SQL_CACHE a.* FROM `sym_authors` AS `a` WHERE `username` = 'mprofitl' ORDER BY a.id ASC LIMIT 1;
[0.0004] UPDATE sym_authors SET `last_seen` = '2017-08-13 16:34:20' WHERE `id` = 1;
[0.0008] SELECT SQL_CACHE `s`.* FROM `sym_sections` AS `s` ORDER BY `s`.`sortorder` asc;
[0.0012] SHOW COLUMNS FROM `sym_fields_multilingual_textbox` WHERE Field = 'handle_unique';
[0.0006] SHOW COLUMNS FROM `sym_fields_multilingual_textbox` WHERE Field = 'field_id'; 
nitriques commented 7 years ago

Which version of the Textbox extension ? Can you try updating the Textbox first ?

mprofitlich commented 7 years ago

I use textbox 2.3.3 – and I now realised that I was checking in outdated repository: https://github.com/psychoticmeow/textboxfield is outdated https://github.com/symphonists/textboxfield is new I guess brendo should close this repository or at least set a link to the new one.

After I installed the new textbox extension, the multilingual textbox allowed to be installed as well. Thank you, nitriques!

nitriques commented 7 years ago

I guess brendo should close this repository

It is not Brendo's, it is Rowan ;)

or at least set a link to the new one.

Where is the bad link ? I though I updated them. Anyways, I'll fix it if you can tell me. Thanks!

mprofitlich commented 7 years ago

Hello nitriques

Here's how I got it wrong: I had version 2.3.3 of text box installed. Its github link in the backend (page extension) points to https://github.com/rowan-lewis/textboxfield

This did not confuse me but I found out while answering your question: On the getsymphony page (download/extensions) is a link to another version of text box. http://www.getsymphony.com/download/extensions/?query=text+box. Via this page it points at the same outdated repository of Rowan but to a tree 2.2.

Something I do not understand: I http://www.getsymphony.com/download/extensions still in use or has it been replaced by http://symphonyextensions.com? I feel the core team very well knows about those things but from my outsider position it is confusing. If symphonyextensions.com replaces the old list, I suggest to bring the list offline and to just place a link to symphonyextensions.com.

Thanks and best regards

nitriques commented 7 years ago

@mprofitl thanks for the feedback. I've update the url here: http://www.getsymphony.com/download/extensions/view/21137/

Maintaining this is a real pain and hard to do!

Something I do not understand: I http://www.getsymphony.com/download/extensions still in use or has it been replaced by http://symphonyextensions.com?

Kind of. But that move has never been made official, expect the two lines on http://www.getsymphony.com/download/extensions/

There is also a community ran website that collects extensions informations directly from github! Give it a try!

But I think the warning should be bigger ???

mprofitlich commented 7 years ago

Thanks for explaining, nitriques!

Why those two places? Are there any extensions on the getsymphony.com site that are not on Github? I found some (randomly opening them) that have no link to anywhere and no files but I did not find any that have their files directly on getsymphony.com, all files seem to be on Githib anyway.

Why not take the download/extensions pages offline? And why isn't symphonyextensions.com part of getsymphony.com? I know, there is always plenty of good reasons… For easy use however there should be just one place, I believe.

If I can help (read as work) towards a simplification, I will be happy to give a hand. I have profited a lot from other peoples' work and help, it would be nice to pay back.

nitriques commented 7 years ago

Are there any extensions on the getsymphony.com site that are not on Github

Yes, but they are old.

Why not take the download/extensions pages offline?

A lot of people still wants them as archives.

And why isn't symphonyextensions.com part of getsymphony.com?

Because symphonyextensions.com was created and run by another member of the community.

If I can help (read as work) towards a simplification,

Discussion around those topic are discussed here: https://github.com/symphonists/symphony-extensions-network Feel free to join/comment/create issues! We are currently discussing this on the chat also https://gitter.im/symphonycms/symphony-2