problems after migrating to php7

  • Martin7
  • Autore della discussione
  • Offline
  • Anziano Utente
  • Anziano Utente
Di più
8 Anni 4 Mesi fa #2480 da Martin7
problems after migrating to php7 è stato creato da Martin7
hi JoomlaSystems,

after migrating to php7 I have noticed many problem in Joomla causes by the CPtags plugin.

Problem appears with the error message in backend:

"Call to undefined function mysql_escape_string()"

when I try to save article, and other objects from other components (like form of UniForm component) or try to edit other objects.

The developers from JoomlaShine confirmed that the problem is produced by the \plugins\content\cptags\cptags.php plugin.

"Dear Martin,

After investigating, we found out the problem caused by this \plugins\content\cptags\cptags.php

It's using an out date PHP function, and it makes the Joomla Article doesn't work too, please create a new Article then save > the same error appears.

Recommend you to remove this component, or contact the provider to help you fix it.

Thank you :)"

could you please urgently make fix for this problem?

Another question : why this plugin is fired when I create / save / edit non-article objects from other components?

thanks and waiting for for your help !

Martin
I seguenti utenti hanno detto grazie : kulturgoteborg

Si prega Accesso o Crea un account a partecipare alla conversazione.

Di più
8 Anni 4 Mesi fa - 8 Anni 4 Mesi fa #2481 da andrea_4g
Risposta da andrea_4g al topic problems after migrating to php7
Custom Properties is NOT PHP7 ready at this time.
It will take some time to thoroughly test it.

You should revert to previous PHP versions.
Ultima Modifica 8 Anni 4 Mesi fa da andrea_4g.

Si prega Accesso o Crea un account a partecipare alla conversazione.

  • Martin7
  • Autore della discussione
  • Offline
  • Anziano Utente
  • Anziano Utente
Di più
8 Anni 4 Mesi fa #2482 da Martin7
Risposta da Martin7 al topic problems after migrating to php7
hi Andrea,

thanks for your answer. I am using php7 since some time and look actually not bad - so far CP works and I did not notice any other problem except only this one. Could you please maybe fix just this one problem?

thanks in advance

Marcin
I seguenti utenti hanno detto grazie : kulturgoteborg

Si prega Accesso o Crea un account a partecipare alla conversazione.

Di più
8 Anni 4 Mesi fa #2483 da andrea_4g
Risposta da andrea_4g al topic problems after migrating to php7
Hi,
as of now less that 1% of websites is using PHP7, that's why testing and upgrading CP to that version of PHP is not very high in our priorities.

About the problem you are reporting, you can try replacing 'mysql_escape_string' with 'mysql_real_escape_string'.

The plugin is fired when you create / save an article because during the creation of the article you might just be assigning tags, that need to be saved.

Si prega Accesso o Crea un account a partecipare alla conversazione.

  • Martin7
  • Autore della discussione
  • Offline
  • Anziano Utente
  • Anziano Utente
Di più
8 Anni 3 Mesi fa #2484 da Martin7
Risposta da Martin7 al topic problems after migrating to php7
hi Andrea,

thanks for your answer.

1) mysql_real_escape_string is deprecated in php7 as well. I have used mysqli_escape_string in /plugins/content/cptags/cptags.php and it seems to solve this problem.

This function is available since php5 so you could use this change without braking the backwards compatibility with php5

php.net/manual/de/function.mysqli-escape-string.php

Could you please include this into the next release?

2) It seems this plugin is called not only when adding article but when adding ANY kind of object. I have this problem when
- adding new native Joomla article
- adding new Form of the UniForm extension
- adding new category of the Minitek Content Utilities extension.

I would guess CP component is related only to native Joomla article so this plugin should not fire when working with any other Joomla objects.

Could you please investigate the problem this problem?

thanks in advance
Martin

Si prega Accesso o Crea un account a partecipare alla conversazione.

Di più
8 Anni 3 Mesi fa #2485 da andrea_4g
Risposta da andrea_4g al topic problems after migrating to php7
Thanks for your input.
It will be part of the next release.

About CP being triggered:
Custom Properties plugin is triggered whenever the 'onContentAfterSave' event is fired.
Many components (including several Joomla-native ones, K2, etc) fires this event.

Si prega Accesso o Crea un account a partecipare alla conversazione.

Tempo creazione pagina: 0.183 secondi