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

[3][com_postinstall] warning on php 8 #31446

Closed
alikon opened this issue Nov 21, 2020 · 18 comments
Closed

[3][com_postinstall] warning on php 8 #31446

alikon opened this issue Nov 21, 2020 · 18 comments
Labels
No Code Attached Yet PHP 8.x PHP 8.x deprecated issues

Comments

@alikon
Copy link
Contributor

alikon commented Nov 21, 2020

Steps to reproduce the issue

use php 8
go to Admin->Control Panel

Expected result

no warning

Actual result

[21-Nov-2020 08:46:20 UTC] PHP Warning:  FOFModelBehavior::onBeforeBuildQuery(): Argument #1 ($model) must be passed by reference, value given in /shared/httpd/joomla3/joomla-cms-staging/libraries/fof/utils/observable/event.php on line 63
[21-Nov-2020 08:46:20 UTC] PHP Stack trace:
[21-Nov-2020 08:46:20 UTC] PHP   1. {main}() /shared/httpd/joomla3/joomla-cms-staging/administrator/index.php:0
[21-Nov-2020 08:46:20 UTC] PHP   2. Joomla\CMS\Application\AdministratorApplication->execute() /shared/httpd/joomla3/joomla-cms-staging/administrator/index.php:51
[21-Nov-2020 08:46:20 UTC] PHP   3. Joomla\CMS\Application\AdministratorApplication->doExecute() /shared/httpd/joomla3/joomla-cms-staging/libraries/src/Application/CMSApplication.php:196
[21-Nov-2020 08:46:20 UTC] PHP   4. Joomla\CMS\Application\AdministratorApplication->dispatch($component = *uninitialized*) /shared/httpd/joomla3/joomla-cms-staging/libraries/src/Application/AdministratorApplication.php:159
[21-Nov-2020 08:46:20 UTC] PHP   5. Joomla\CMS\Component\ComponentHelper::renderComponent($option = 'com_cpanel', $params = *uninitialized*) /shared/httpd/joomla3/joomla-cms-staging/libraries/src/Application/AdministratorApplication.php:101
[21-Nov-2020 08:46:20 UTC] PHP   6. Joomla\CMS\Component\ComponentHelper::executeComponent($path = '/shared/httpd/joomla3/joomla-cms-staging/administrator/components/com_cpanel/cpanel.php') /shared/httpd/joomla3/joomla-cms-staging/libraries/src/Component/ComponentHelper.php:377
[21-Nov-2020 08:46:20 UTC] PHP   7. require_once() /shared/httpd/joomla3/joomla-cms-staging/libraries/src/Component/ComponentHelper.php:402
[21-Nov-2020 08:46:20 UTC] PHP   8. CpanelController->execute($task = NULL) /shared/httpd/joomla3/joomla-cms-staging/administrator/components/com_cpanel/cpanel.php:15
[21-Nov-2020 08:46:20 UTC] PHP   9. CpanelController->display($cachable = *uninitialized*, $urlparams = *uninitialized*) /shared/httpd/joomla3/joomla-cms-staging/libraries/src/MVC/Controller/BaseController.php:710
[21-Nov-2020 08:46:20 UTC] PHP  10. CpanelViewCpanel->display($tpl = *uninitialized*) /shared/httpd/joomla3/joomla-cms-staging/libraries/src/MVC/Controller/BaseController.php:672
[21-Nov-2020 08:46:20 UTC] PHP  11. PostinstallModelMessages->getItemList($overrideLimits = *uninitialized*, $group = *uninitialized*) /shared/httpd/joomla3/joomla-cms-staging/administrator/components/com_cpanel/views/cpanel/view.html.php:53
[21-Nov-2020 08:46:20 UTC] PHP  12. PostinstallModelMessages->buildQuery($overrideLimits = FALSE) /shared/httpd/joomla3/joomla-cms-staging/libraries/fof/model/model.php:1221
[21-Nov-2020 08:46:20 UTC] PHP  13. PostinstallModelMessages->buildQuery($overrideLimits = FALSE) /shared/httpd/joomla3/joomla-cms-staging/administrator/components/com_postinstall/models/messages.php:30
[21-Nov-2020 08:46:20 UTC] PHP  14. FOFModelDispatcherBehavior->trigger($event = 'onBeforeBuildQuery', $args = [0 => class PostinstallModelMessages { protected $__state_set = NULL; protected $_db = class FOFDatabaseDriverJoomla { ... }; protected $event_after_delete = 'onContentAfterDelete'; protected $event_after_save = 'onContentAfterSave'; protected $event_before_delete = 'onContentBeforeDelete'; protected $event_before_save = 'onContentBeforeSave'; protected $event_change_state = 'onContentChangeState'; protected $event_clean_cache = NULL; protected $id_list = NULL; protected $id = 0; protected $input = class FOFInput { ... }; protected $list = NULL; protected $name = 'messages'; protected $option = 'com_postinstall'; protected $otable = NULL; protected $pagination = NULL; protected $record = NULL; protected $state = class FOFUtilsObject { ... }; protected $table = 'message'; protected $total = NULL; protected $_savestate = FALSE; protected $_forms = [...]; protected $_formData = [...]; protected $configProvider = class FOFConfigProvider { ... }; protected $modelDispatcher = class FOFModelDispatcherBehavior { ... }; protected $default_behaviors = [...]; protected $_behaviorParams = [...]; protected $_errors = [...] }, 1 => class JDatabaseQueryPdomysql { protected $offset = NULL; protected $limit = NULL; protected $db = class JDatabaseDriverPdomysql { ... }; protected $sql = NULL; protected $type = ''; protected $element = NULL; protected $select = NULL; protected $delete = NULL; protected $update = NULL; protected $insert = NULL; protected $from = NULL; protected $join = NULL; protected $set = NULL; protected $where = NULL; protected $group = NULL; protected $having = NULL; protected $columns = NULL; protected $values = NULL; protected $order = NULL; protected $autoIncrementField = NULL; protected $call = NULL; protected $exec = NULL; protected $union = NULL; protected $unionAll = NULL; protected $selectRowNumber = NULL }]) /shared/httpd/joomla3/joomla-cms-staging/libraries/fof/model/model.php:2071
[21-Nov-2020 08:46:20 UTC] PHP  15. FOFModelBehaviorFilters->update($args = [0 => class PostinstallModelMessages { protected $__state_set = NULL; protected $_db = class FOFDatabaseDriverJoomla { ... }; protected $event_after_delete = 'onContentAfterDelete'; protected $event_after_save = 'onContentAfterSave'; protected $event_before_delete = 'onContentBeforeDelete'; protected $event_before_save = 'onContentBeforeSave'; protected $event_change_state = 'onContentChangeState'; protected $event_clean_cache = NULL; protected $id_list = NULL; protected $id = 0; protected $input = class FOFInput { ... }; protected $list = NULL; protected $name = 'messages'; protected $option = 'com_postinstall'; protected $otable = NULL; protected $pagination = NULL; protected $record = NULL; protected $state = class FOFUtilsObject { ... }; protected $table = 'message'; protected $total = NULL; protected $_savestate = FALSE; protected $_forms = [...]; protected $_formData = [...]; protected $configProvider = class FOFConfigProvider { ... }; protected $modelDispatcher = class FOFModelDispatcherBehavior { ... }; protected $default_behaviors = [...]; protected $_behaviorParams = [...]; protected $_errors = [...] }, 1 => class JDatabaseQueryPdomysql { protected $offset = NULL; protected $limit = NULL; protected $db = class JDatabaseDriverPdomysql { ... }; protected $sql = NULL; protected $type = ''; protected $element = NULL; protected $select = NULL; protected $delete = NULL; protected $update = NULL; protected $insert = NULL; protected $from = NULL; protected $join = NULL; protected $set = NULL; protected $where = NULL; protected $group = NULL; protected $having = NULL; protected $columns = NULL; protected $values = NULL; protected $order = NULL; protected $autoIncrementField = NULL; protected $call = NULL; protected $exec = NULL; protected $union = NULL; protected $unionAll = NULL; protected $selectRowNumber = NULL }]) /shared/httpd/joomla3/joomla-cms-staging/libraries/fof/utils/observable/dispatcher.php:146
[21-Nov-2020 08:46:20 UTC] PHP Warning:  FOFModelBehaviorFilters::onAfterBuildQuery(): Argument #1 ($model) must be passed by reference, value given in /shared/httpd/joomla3/joomla-cms-staging/libraries/fof/utils/observable/event.php on line 63
[21-Nov-2020 08:46:20 UTC] PHP Stack trace:
[21-Nov-2020 08:46:20 UTC] PHP   1. {main}() /shared/httpd/joomla3/joomla-cms-staging/administrator/index.php:0
[21-Nov-2020 08:46:20 UTC] PHP   2. Joomla\CMS\Application\AdministratorApplication->execute() /shared/httpd/joomla3/joomla-cms-staging/administrator/index.php:51
[21-Nov-2020 08:46:20 UTC] PHP   3. Joomla\CMS\Application\AdministratorApplication->doExecute() /shared/httpd/joomla3/joomla-cms-staging/libraries/src/Application/CMSApplication.php:196
[21-Nov-2020 08:46:20 UTC] PHP   4. Joomla\CMS\Application\AdministratorApplication->dispatch($component = *uninitialized*) /shared/httpd/joomla3/joomla-cms-staging/libraries/src/Application/AdministratorApplication.php:159
[21-Nov-2020 08:46:20 UTC] PHP   5. Joomla\CMS\Component\ComponentHelper::renderComponent($option = 'com_cpanel', $params = *uninitialized*) /shared/httpd/joomla3/joomla-cms-staging/libraries/src/Application/AdministratorApplication.php:101
[21-Nov-2020 08:46:20 UTC] PHP   6. Joomla\CMS\Component\ComponentHelper::executeComponent($path = '/shared/httpd/joomla3/joomla-cms-staging/administrator/components/com_cpanel/cpanel.php') /shared/httpd/joomla3/joomla-cms-staging/libraries/src/Component/ComponentHelper.php:377
[21-Nov-2020 08:46:20 UTC] PHP   7. require_once() /shared/httpd/joomla3/joomla-cms-staging/libraries/src/Component/ComponentHelper.php:402
[21-Nov-2020 08:46:20 UTC] PHP   8. CpanelController->execute($task = NULL) /shared/httpd/joomla3/joomla-cms-staging/administrator/components/com_cpanel/cpanel.php:15
[21-Nov-2020 08:46:20 UTC] PHP   9. CpanelController->display($cachable = *uninitialized*, $urlparams = *uninitialized*) /shared/httpd/joomla3/joomla-cms-staging/libraries/src/MVC/Controller/BaseController.php:710
[21-Nov-2020 08:46:20 UTC] PHP  10. CpanelViewCpanel->display($tpl = *uninitialized*) /shared/httpd/joomla3/joomla-cms-staging/libraries/src/MVC/Controller/BaseController.php:672
[21-Nov-2020 08:46:20 UTC] PHP  11. PostinstallModelMessages->getItemList($overrideLimits = *uninitialized*, $group = *uninitialized*) /shared/httpd/joomla3/joomla-cms-staging/administrator/components/com_cpanel/views/cpanel/view.html.php:53
[21-Nov-2020 08:46:20 UTC] PHP  12. PostinstallModelMessages->buildQuery($overrideLimits = FALSE) /shared/httpd/joomla3/joomla-cms-staging/libraries/fof/model/model.php:1221
[21-Nov-2020 08:46:20 UTC] PHP  13. PostinstallModelMessages->buildQuery($overrideLimits = FALSE) /shared/httpd/joomla3/joomla-cms-staging/administrator/components/com_postinstall/models/messages.php:30
[21-Nov-2020 08:46:20 UTC] PHP  14. FOFModelDispatcherBehavior->trigger($event = 'onAfterBuildQuery', $args = [0 => class PostinstallModelMessages { protected $__state_set = TRUE; protected $_db = class FOFDatabaseDriverJoomla { ... }; protected $event_after_delete = 'onContentAfterDelete'; protected $event_after_save = 'onContentAfterSave'; protected $event_before_delete = 'onContentBeforeDelete'; protected $event_before_save = 'onContentBeforeSave'; protected $event_change_state = 'onContentChangeState'; protected $event_clean_cache = NULL; protected $id_list = NULL; protected $id = 0; protected $input = class FOFInput { ... }; protected $list = NULL; protected $name = 'messages'; protected $option = 'com_postinstall'; protected $otable = NULL; protected $pagination = NULL; protected $record = NULL; protected $state = class FOFUtilsObject { ... }; protected $table = 'message'; protected $total = NULL; protected $_savestate = FALSE; protected $_forms = [...]; protected $_formData = [...]; protected $configProvider = class FOFConfigProvider { ... }; protected $modelDispatcher = class FOFModelDispatcherBehavior { ... }; protected $default_behaviors = [...]; protected $_behaviorParams = [...]; protected $_errors = [...] }, 1 => class JDatabaseQueryPdomysql { protected $offset = NULL; protected $limit = NULL; protected $db = class JDatabaseDriverPdomysql { ... }; protected $sql = NULL; protected $type = 'select'; protected $element = NULL; protected $select = class JDatabaseQueryElement { ... }; protected $delete = NULL; protected $update = NULL; protected $insert = NULL; protected $from = class JDatabaseQueryElement { ... }; protected $join = NULL; protected $set = NULL; protected $where = NULL; protected $group = NULL; protected $having = NULL; protected $columns = NULL; protected $values = NULL; protected $order = class JDatabaseQueryElement { ... }; protected $autoIncrementField = NULL; protected $call = NULL; protected $exec = NULL; protected $union = NULL; protected $unionAll = NULL; protected $selectRowNumber = NULL }]) /shared/httpd/joomla3/joomla-cms-staging/libraries/fof/model/model.php:2115
[21-Nov-2020 08:46:20 UTC] PHP  15. FOFModelBehaviorFilters->update($args = [0 => class PostinstallModelMessages { protected $__state_set = TRUE; protected $_db = class FOFDatabaseDriverJoomla { ... }; protected $event_after_delete = 'onContentAfterDelete'; protected $event_after_save = 'onContentAfterSave'; protected $event_before_delete = 'onContentBeforeDelete'; protected $event_before_save = 'onContentBeforeSave'; protected $event_change_state = 'onContentChangeState'; protected $event_clean_cache = NULL; protected $id_list = NULL; protected $id = 0; protected $input = class FOFInput { ... }; protected $list = NULL; protected $name = 'messages'; protected $option = 'com_postinstall'; protected $otable = NULL; protected $pagination = NULL; protected $record = NULL; protected $state = class FOFUtilsObject { ... }; protected $table = 'message'; protected $total = NULL; protected $_savestate = FALSE; protected $_forms = [...]; protected $_formData = [...]; protected $configProvider = class FOFConfigProvider { ... }; protected $modelDispatcher = class FOFModelDispatcherBehavior { ... }; protected $default_behaviors = [...]; protected $_behaviorParams = [...]; protected $_errors = [...] }, 1 => class JDatabaseQueryPdomysql { protected $offset = NULL; protected $limit = NULL; protected $db = class JDatabaseDriverPdomysql { ... }; protected $sql = NULL; protected $type = 'select'; protected $element = NULL; protected $select = class JDatabaseQueryElement { ... }; protected $delete = NULL; protected $update = NULL; protected $insert = NULL; protected $from = class JDatabaseQueryElement { ... }; protected $join = NULL; protected $set = NULL; protected $where = NULL; protected $group = NULL; protected $having = NULL; protected $columns = NULL; protected $values = NULL; protected $order = class JDatabaseQueryElement { ... }; protected $autoIncrementField = NULL; protected $call = NULL; protected $exec = NULL; protected $union = NULL; protected $unionAll = NULL; protected $selectRowNumber = NULL }]) /shared/httpd/joomla3/joomla-cms-staging/libraries/fof/utils/observable/dispatcher.php:146

System information (as much as possible)

php 8
jooomla 3 staging/rc

@alikon alikon added the PHP 8.x PHP 8.x deprecated issues label Nov 21, 2020
@HLeithner
Copy link
Member

I can't reproduce this, do you have any 3rd party extensions installed?

@alikon
Copy link
Contributor Author

alikon commented Nov 21, 2020

No, clean staging branch with php8 rc4
Screenshot from 2020-11-21 10-12-27

@HLeithner
Copy link
Member

can you try to apply a similar patch like #30608 to libraries/fof/utils/observable/event.php line 63?

@alikon
Copy link
Contributor Author

alikon commented Nov 21, 2020

i've already done that....with no luck
i'm currently unable to go deep cause still figthing with my setup docker/php8/Xdebug v3.0.0RC2-dev

@HLeithner
Copy link
Member

Compiling php8-rc5 now (missed it till now)

@HLeithner
Copy link
Member

@alikon do you get the error also without xdebug?

@alikon
Copy link
Contributor Author

alikon commented Nov 21, 2020

yes
Screenshot from 2020-11-21 13-03-59

@HLeithner
Copy link
Member

I think you have to fix it I can't reproduce it and no one else who tested php 8.0 (since it's the first admin page ;-)

@alikon
Copy link
Contributor Author

alikon commented Nov 22, 2020

ok let's close it

@alikon alikon closed this as completed Nov 22, 2020
@HLeithner
Copy link
Member

So you don't try to find the problem and provide a pr?

@alikon
Copy link
Contributor Author

alikon commented Nov 22, 2020

i'll wait for the stable version of both php8 and xdebug3....maybe i've made some mistake on my local settings to run on -dev environment

@Cecile-GH
Copy link

Hello, I got two similar warning messages when upgrading from php7.2.10 to php7.3.24. However, they disappear when I deactivate the php_xdebug extension. This bug seems to be Akeeba related. Can anyone tell me how to fix it?

Messages (localhost > Joomla! 3.9.22 > Control Panel) :

Warning: Parameter 1 to FOFModelBehavior::onBeforeBuildQuery() expected to be a reference, value given in C:\wamp64\www\export\libraries\fof\utils\observable\event.php on line 63

Warning: Parameter 1 to FOFModelBehaviorFilters::onAfterBuildQuery() expected to be a reference, value given in C:\wamp64\www\export\libraries\fof\utils\observable\event.php on line 63


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31446.

@HLeithner
Copy link
Member

No it's not akkeba it's only FOF which is an old version bundled with joomla.

@Cecile-GH
Copy link

@HLeithner
Thank you.
"only FOF":
Does it mean that there is actually no problem — that I will not get stuck when working on my local host?
If so, how can I have the warnings removed without deactivating the php_xdebug extension?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31446.

@HLeithner
Copy link
Member

actually I can't replicate the issues, it would be awesome if someone who can reproduce the problem find and solve it.

@Cecile-GH
Copy link

@HLeithner
Thanks. I'll wait and see.

@alikon
Copy link
Contributor Author

alikon commented Nov 30, 2020

please test #31537

@Cecile-GH
Copy link

Thank you. FYI, problem solved with latest Joomla updates.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31446.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No Code Attached Yet PHP 8.x PHP 8.x deprecated issues
Projects
None yet
Development

No branches or pull requests

4 participants