HTTP 500 Whoops
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
-
- Joomla! Apprentice
- Posts: 8
- Joined: Sat Apr 13, 2024 5:00 am
HTTP 500 Whoops
Hi,
After update from joomla 4 to 5 and putting "Search Engine Friendly URLs" on this error comes up when users log in
Joomla\Utilities\ArrayHelper::getColumn(): Argument #1 ($array) must be of type array, null given, called in /plugins/content/joomla/src/Extension/Joomla.php on line 331
11.2.3-MariaDB
PHP Version 8.2.14
Apache/2.4.58
Joomla! 5.0.3 Stable
After update from joomla 4 to 5 and putting "Search Engine Friendly URLs" on this error comes up when users log in
Joomla\Utilities\ArrayHelper::getColumn(): Argument #1 ($array) must be of type array, null given, called in /plugins/content/joomla/src/Extension/Joomla.php on line 331
11.2.3-MariaDB
PHP Version 8.2.14
Apache/2.4.58
Joomla! 5.0.3 Stable
- ceford
- Joomla! Hero
- Posts: 2741
- Joined: Mon Feb 24, 2014 10:38 pm
- Location: Edinburgh, Scotland
- Contact:
Re: HTTP 500 Whoops
You may have uncovered a bug in Joomla. The section of code where the error occurs is related to views of type 'category', 'featured' and 'archive'. If there are articles available in one of those when the user is not logged in all would be well. But if login makes no articles available - for example if article permissions are set to Guest then the error may be triggered.
Can you provide a bit more information? Set Debug System to Yes and Error Reporting to Maximum and then get a full Stack Trace to post here.
Can you provide a bit more information? Set Debug System to Yes and Error Reporting to Maximum and then get a full Stack Trace to post here.
-
- Joomla! Apprentice
- Posts: 8
- Joined: Sat Apr 13, 2024 5:00 am
Re: HTTP 500 Whoops
I hope this debug page in zip-file helps.
You do not have the required permissions to view the files attached to this post.
- ceford
- Joomla! Hero
- Posts: 2741
- Joined: Mon Feb 24, 2014 10:38 pm
- Location: Edinburgh, Scotland
- Contact:
Re: HTTP 500 Whoops
Please past a screen shot of the stack trace here!
-
- Joomla! Apprentice
- Posts: 8
- Joined: Sat Apr 13, 2024 5:00 am
Re: HTTP 500 Whoops
Here..
You do not have the required permissions to view the files attached to this post.
- ceford
- Joomla! Hero
- Posts: 2741
- Joined: Mon Feb 24, 2014 10:38 pm
- Location: Edinburgh, Scotland
- Contact:
Re: HTTP 500 Whoops
The stack trace is not really helping. You really need to be able to step through the code to see what is going on. That is not easy if the site is on-line. Do have a desktop/laptop development environment? If not you could try adding a couple of lines to plugins/content/joomla/src/Extension/Joomla.php to bracket line 331:
Then look in administrator/logs/bugtest.php - it should show which views are fetching lists of articles and whether they worked. So we look for one that did not work and the next step is to find out why not.
Code: Select all
\file_put_contents(JPATH_ADMINISTRATOR . '/logs/bugtest.php', $view . "\n", FILE_APPEND);
$articleIds = ArrayHelper::getColumn($articles, 'id');
\file_put_contents(JPATH_ADMINISTRATOR . '/logs/bugtest.php', $view . " worked!\n", FILE_APPEND);
-
- Joomla! Apprentice
- Posts: 8
- Joined: Sat Apr 13, 2024 5:00 am
Re: HTTP 500 Whoops
Content of bugtest.php
category
category
Every reload makes 2 lines.
category
category
Every reload makes 2 lines.
- ceford
- Joomla! Hero
- Posts: 2741
- Joined: Mon Feb 24, 2014 10:38 pm
- Location: Edinburgh, Scotland
- Contact:
Re: HTTP 500 Whoops
Are you logging in via a login module or a menu? What does your login redirect point to?
Can you turn off SEO and see if the browser URL bar contains view=category like this one:
I just reproduced your error by changing the last number to 133 - an Itemid that does not exist. 132 is the id in the menu table - a menu item I made for a Category blog.
Edit: actually, not exactly your error but one occurring a few lines earlier.
Can you turn off SEO and see if the browser URL bar contains view=category like this one:
Code: Select all
http://localhost/j5/index.php?option=com_content&view=category&layout=list&id=8&Itemid=132
Edit: actually, not exactly your error but one occurring a few lines earlier.
-
- Joomla! Apprentice
- Posts: 8
- Joined: Sat Apr 13, 2024 5:00 am
Re: HTTP 500 Whoops
>Are you logging in via a login module or a menu? What does your login redirect point to?
Both ways. Not selected any "Login Redirection Page"
Login actually responds name, profile link etc. After selecting something.. error comes
>Can you turn off SEO and see if the browser URL bar contains view=category like this one:
Yes it does and site works fine.
Yes wrong Itemid gives different error
index.php?option=com_content&view=category&layout=list&id=20&Itemid=X
Call to a member function getParams() on null and Warning Attempt to read property "title" on null in /var/www/html/plugins/content/joomla/src/Extension/Joomla.php on line 319
Both ways. Not selected any "Login Redirection Page"
Login actually responds name, profile link etc. After selecting something.. error comes
>Can you turn off SEO and see if the browser URL bar contains view=category like this one:
Yes it does and site works fine.
Yes wrong Itemid gives different error
index.php?option=com_content&view=category&layout=list&id=20&Itemid=X
Call to a member function getParams() on null and Warning Attempt to read property "title" on null in /var/www/html/plugins/content/joomla/src/Extension/Joomla.php on line 319
-
- Joomla! Apprentice
- Posts: 8
- Joined: Sat Apr 13, 2024 5:00 am
Re: HTTP 500 Whoops
I research more.
SEF on - When logged in user can see acticles which are set permission registered but not public.
SEF on - When logged in user can see acticles which are set permission registered but not public.
- ceford
- Joomla! Hero
- Posts: 2741
- Joined: Mon Feb 24, 2014 10:38 pm
- Location: Edinburgh, Scotland
- Contact:
Re: HTTP 500 Whoops
What we know is that on line 329 $model->getItems() returns null. I have not found how it can do that. Try this pair of planted lines on either side of line 329:
The lines are not always executed because they are cached. Try login/logout to force something to appear in the bugtest.php file.
Code: Select all
\file_put_contents(JPATH_ADMINISTRATOR . '/logs/bugtest.php', $model->option .' ' . $model->name . "\n", FILE_APPEND);
$articleIds = ArrayHelper::getColumn($articles, 'id');
\file_put_contents(JPATH_ADMINISTRATOR . '/logs/bugtest.php', $view . " worked!\n", FILE_APPEND);
-
- Joomla! Apprentice
- Posts: 8
- Joined: Sat Apr 13, 2024 5:00 am
Re: HTTP 500 Whoops
Now we have 2 lines in that file.
com_content category
com_content category
com_content category
com_content category
- ceford
- Joomla! Hero
- Posts: 2741
- Joined: Mon Feb 24, 2014 10:38 pm
- Location: Edinburgh, Scotland
- Contact:
Re: HTTP 500 Whoops
I think the two lines may correspond to the Exceptions [2] and Stack Traces [2] in your screenshot. I am stumped because I can't find anywhere that returns null rather than an empty array. Could you look in your system PHP error log if you have access to it and know where it is. It may contain an error in retrieving the list of articles.
Edit: as a temporary measure you could comment out line 331 and add this on the next line:
Just to see what you get.
Edit: as a temporary measure you could comment out line 331 and add this on the next line:
Code: Select all
$articleIds = empty($articles) ? [] : ArrayHelper::getColumn($articles, 'id');
-
- Joomla! Apprentice
- Posts: 8
- Joined: Sat Apr 13, 2024 5:00 am
Re: HTTP 500 Whoops
Only line in php log is
PHP Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/libraries/vendor/joomla/application/src/Web/WebClient.php on line 310
And after temporary fix, site comes up with SEF on.
PHP Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/libraries/vendor/joomla/application/src/Web/WebClient.php on line 310
And after temporary fix, site comes up with SEF on.
- ceford
- Joomla! Hero
- Posts: 2741
- Joined: Mon Feb 24, 2014 10:38 pm
- Location: Edinburgh, Scotland
- Contact:
Re: HTTP 500 Whoops
What do you see in the URL bar after the domain part?
Come back if you have other problems.
Come back if you have other problems.