gantry / gantry5

:rocket: Next Generation Template / Theme Framework
http://gantry.org
1.04k stars 204 forks source link

Gantry 5.5 - 500 Internal Server Error, when choosing "Joomla Articles" particle #2909

Closed mariantanase closed 3 years ago

mariantanase commented 3 years ago

Hi, Case issue:

Here are the steps: Content > Site modules > New > Gantry 5 Particle > Pick a particle > Choose "Joomla articles" Then click to "Select".

Result: Shows a 500 Internal Server Error. 500servererror

mahagr commented 3 years ago

Either this one has been fixed already or I cannot reproduce it. Can you please test again?

mariantanase commented 3 years ago

Using the most recent CI build right ?

mariantanase commented 3 years ago

Unfortunately, even with the recent version (5.5.1-dev-5eed68bc2) the problem is still there!

mahagr commented 3 years ago

Which version of PHP are you using? Which database driver? Is there anything else special on your site?

mariantanase commented 3 years ago

PHP 7.4.13 MySQL 8.0.16

Windows 10 Pro x64

ghost commented 3 years ago

I can get something similar to happen in Hydrogen with both PHP 8.0.1 and PHP 7.4.16

See video https://www.screencast.com/t/a7ah3IODQ

rhukster commented 3 years ago

Does your Apache error log provide specifics?

ghost commented 3 years ago

I can't reproduce this (or similar) any longer on latest CI build for G5.5 and Hydrogen. Please can you try again with latest CI and clear browser and server cache too.

ghost commented 3 years ago

aha! actually I can get the [object][object] error - it occurs when the users is no longer logged into backed (either logout via another tab or session timeout occurs). So that's how to reproduce

mahagr commented 3 years ago

@marktaylor46 It's not the same issue, so I guess we can close this one if @mariantanase can also confirm it's been fixed.

mariantanase commented 3 years ago

I have installed today packages (joomla-pkg_gantry5_develop.zip and joomla-tpl_g5_hydrogen_develop.zip) over existinting one. Do I need to do a clean install ? Anyway, the problem remained, testing with different browser. Later I will try on another computer.

ghost commented 3 years ago

Please look in the apache error log and tell us the full error associated with the server500. Also what version of PHP and mysql are you using? Can you provide login details toa test site for us to look at?

mariantanase commented 3 years ago

I'm on localhost.

(NEARD lamp) PHP 7.4.13 MySQL 8.0.16 Joomla 4.0.3

Windows 10 Pro x64

ghost commented 3 years ago

and what does it say in apache error log for that server 500 please?

mariantanase commented 3 years ago

The content of apache_error.log it seems to show nothing related to that error. Anyway these are:

[Tue Oct 26 09:39:38.942228 2021] [mpm_winnt:notice] [pid 11368:tid 544] AH00455: Apache/2.4.41 (Win32) OpenSSL/1.0.2s PHP/7.4.13 configured -- resuming normal operations
[Tue Oct 26 09:39:38.943229 2021] [mpm_winnt:notice] [pid 11368:tid 544] AH00456: Server built: Aug  9 2019 13:58:07
[Tue Oct 26 09:39:38.943229 2021] [core:notice] [pid 11368:tid 544] AH00094: Command line: 'C:\\neard\\bin\\apache\\current\\bin\\httpd.exe -d C:/neard/bin/apache/current'
[Tue Oct 26 09:39:38.997229 2021] [mpm_winnt:notice] [pid 11368:tid 544] AH00418: Parent: Created child process 4968
Apache server interrupted...
021] [mpm_winnt:notice] [pid 4968:tid 472] AH00354: Child: Starting 64 worker threads.
[Tue Oct 26 09:42:33.960334 2021] [php7:notice] [pid 4968:tid 2092] [client 127.0.0.1:7797] PHP Notice:  Trying to get property 'id' of non-object in C:\\neard\\www\\gantry55quickstart\\libraries\\src\\Updater\\Adapter\\ExtensionAdapter.php on line 333, referer: http://localhost/gantry55quickstart/administrator/index.php
[Tue Oct 26 09:42:33.960334 2021] [php7:notice] [pid 4968:tid 2092] [client 127.0.0.1:7797] PHP Stack trace:, referer: http://localhost/gantry55quickstart/administrator/index.php
[Tue Oct 26 09:42:33.960334 2021] [php7:notice] [pid 4968:tid 2092] [client 127.0.0.1:7797] PHP   1. {main}() C:\\neard\\www\\gantry55quickstart\\administrator\\index.php:0, referer: http://localhost/gantry55quickstart/administrator/index.php
[Tue Oct 26 09:42:33.960334 2021] [php7:notice] [pid 4968:tid 2092] [client 127.0.0.1:7797] PHP   2. require_once() C:\\neard\\www\\gantry55quickstart\\administrator\\index.php:32, referer: http://localhost/gantry55quickstart/administrator/index.php
[Tue Oct 26 09:42:33.960334 2021] [php7:notice] [pid 4968:tid 2092] [client 127.0.0.1:7797] PHP   3. Joomla\\CMS\\Application\\AdministratorApplication->execute() C:\\neard\\www\\gantry55quickstart\\administrator\\includes\\app.php:63, referer: http://localhost/gantry55quickstart/administrator/index.php
[Tue Oct 26 09:42:33.960334 2021] [php7:notice] [pid 4968:tid 2092] [client 127.0.0.1:7797] PHP   4. Joomla\\CMS\\Application\\AdministratorApplication->doExecute() C:\\neard\\www\\gantry55quickstart\\libraries\\src\\Application\\CMSApplication.php:278, referer: http://localhost/gantry55quickstart/administrator/index.php
[Tue Oct 26 09:42:33.960334 2021] [php7:notice] [pid 4968:tid 2092] [client 127.0.0.1:7797] PHP   5. Joomla\\CMS\\Application\\AdministratorApplication->dispatch() C:\\neard\\www\\gantry55quickstart\\libraries\\src\\Application\\AdministratorApplication.php:186, referer: http://localhost/gantry55quickstart/administrator/index.php
[Tue Oct 26 09:42:33.960334 2021] [php7:notice] [pid 4968:tid 2092] [client 127.0.0.1:7797] PHP   6. Joomla\\CMS\\Component\\ComponentHelper::renderComponent() C:\\neard\\www\\gantry55quickstart\\libraries\\src\\Application\\AdministratorApplication.php:143, referer: http://localhost/gantry55quickstart/administrator/index.php
[Tue Oct 26 09:42:33.960334 2021] [php7:notice] [pid 4968:tid 2092] [client 127.0.0.1:7797] PHP   7. Joomla\\CMS\\Dispatcher\\ComponentDispatcher->dispatch() C:\\neard\\www\\gantry55quickstart\\libraries\\src\\Component\\ComponentHelper.php:389, referer: http://localhost/gantry55quickstart/administrator/index.php
[Tue Oct 26 09:42:33.960334 2021] [php7:notice] [pid 4968:tid 2092] [client 127.0.0.1:7797] PHP   8. Joomla\\Component\\Installer\\Administrator\\Controller\\UpdateController->execute() C:\\neard\\www\\gantry55quickstart\\libraries\\src\\Dispatcher\\ComponentDispatcher.php:146, referer: http://localhost/gantry55quickstart/administrator/index.php
[Tue Oct 26 09:42:33.960334 2021] [php7:notice] [pid 4968:tid 2092] [client 127.0.0.1:7797] PHP   9. Joomla\\Component\\Installer\\Administrator\\Controller\\UpdateController->ajax() C:\\neard\\www\\gantry55quickstart\\libraries\\src\\MVC\\Controller\\BaseController.php:730, referer: http://localhost/gantry55quickstart/administrator/index.php
[Tue Oct 26 09:42:33.960334 2021] [php7:notice] [pid 4968:tid 2092] [client 127.0.0.1:7797] PHP  10. Joomla\\Component\\Installer\\Administrator\\Model\\UpdateModel->findUpdates() C:\\neard\\www\\gantry55quickstart\\administrator\\components\\com_installer\\src\\Controller\\UpdateController.php:166, referer: http://localhost/gantry55quickstart/administrator/index.php
[Tue Oct 26 09:42:33.960334 2021] [php7:notice] [pid 4968:tid 2092] [client 127.0.0.1:7797] PHP  11. Joomla\\CMS\\Updater\\Updater->findUpdates() C:\\neard\\www\\gantry55quickstart\\administrator\\components\\com_installer\\src\\Model\\UpdateModel.php:294, referer: http://localhost/gantry55quickstart/administrator/index.php
[Tue Oct 26 09:42:33.960334 2021] [php7:notice] [pid 4968:tid 2092] [client 127.0.0.1:7797] PHP  12. Joomla\\CMS\\Updater\\Updater->getUpdateObjectsForSite() C:\\neard\\www\\gantry55quickstart\\libraries\\src\\Updater\\Updater.php:165, referer: http://localhost/gantry55quickstart/administrator/index.php
[Tue Oct 26 09:42:33.960334 2021] [php7:notice] [pid 4968:tid 2092] [client 127.0.0.1:7797] PHP  13. Joomla\\CMS\\Updater\\Adapter\\ExtensionAdapter->findUpdate() C:\\neard\\www\\gantry55quickstart\\libraries\\src\\Updater\\Updater.php:272, referer: http://localhost/gantry55quickstart/administrator/index.php
ghost commented 3 years ago

You're right - those messages have nothing to do with the error.

I cannot recreate this issue and the error in your screenshot implies something to do with mysql field in the database. Unless we can reproduce this it will be impossible to come up with a fix.

If you could try this on another PC starting afresh with a new installation that would help.

Regards, Mark.

mahagr commented 3 years ago

This is the only place with null dates:

https://github.com/gantry/gantry5/blob/develop/src/platforms/joomla/classes/Gantry/Joomla/Content/ContentFinder.php#L174-L175

what happens if you replace those values with 0?

ghost commented 3 years ago

This is me adding the joomla article particle in G5.5.2 DEV on PHP 8.0.11 with Joomla 4 and as you can see it works fine.

https://www.screencast.com/t/XwLZsh0Pxf

mahagr commented 3 years ago

Also to add my message, are you using DBO or mysqli on your site?

mariantanase commented 3 years ago

Updates On another machine windows with XAMPP: Joomla 4.0.4 Apache 2.4.51 PHP 7.4.25 MySQLi 7.4.25 Latest CI Gantry package + Hydrogen v5.5.2-dev-eae13ff73

The problem is gone ! All fine!

I don't know if was an Apache problem. Used Apache 2.4.49

mahagr commented 3 years ago

It's not an Apache issue. Maybe Joomla didn't override all the library files when updating Gantry?