500 error when publising articles in some categories

Need help upgrading your Joomla! website or converting to Joomla! 4.x?

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.
Post Reply
windtech
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Nov 20, 2006 1:25 pm

500 error when publising articles in some categories

Post by windtech » Tue Feb 13, 2024 3:03 pm

Recently, I upgraded to J4, and everything was working fine. I have already added several articles to the website. But now I am adding new articles to certain categories, and when publishing these, I get a 500 error in the front end for the entire site. When I assign the same article without any changes to another category I already used for other articles in J4, everything works normal again. Also, unpublishing the article solves the problem. I tried disabling SEF to see if that was causing the problem, but that did not help. Debugging and error reporting set to maximum does not give any more information, just the standard red 500 error screen. So far, it happens with two different categories; all other categories I have used so far for new articles do not cause this error. Anyone have an idea what is causing this? Thanks in advance!

Update: Is it possible that it has something to do with the size, the number of images used in the article, or the length? I quickly tested one of the other categories to see if that one was causing the same problem, and I just inserted the text—no images yet. When publishing it, everything was okay. Then I added the images to the article as well, and then it also caused the 500 error.

Update 2: I am not sure if what I described in Update 1 is indeed causing the problem. When assigning the article with all images and the same layout to a different category, which I used for other articles without problems, the error does not occur. 

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 25057
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: 500 error when publising articles in some categories

Post by pe7er » Tue Feb 13, 2024 4:34 pm

Welcome to Joomla forum!

When I encounter such errors, I would enable Joomla's debug + set error reporting to maximum.
That will show the real error.

In your case I would try opening and saving the categories, and then the articles.

Furthermore you might use phpMyAdmin to check the #__categories and #__content tables in the database.
Maybe some of the fields that contain { json data } are too large for the field, so that the closing } tag is not there, which will trigger an error.
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com

windtech
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Nov 20, 2006 1:25 pm

Re: 500 error when publising articles in some categories

Post by windtech » Tue Feb 13, 2024 5:14 pm

Thanks for your reply.

And I just get the red 500 error screen when debugging, and error reporting is set to maximum. So not any specific information.

Saving the categories and articles did not help, unfortunately.

And the articles that were added in J3 in the same categories work normally.


I looked in Myphpadmin, but I am not an expert, so I have no idea what to look for. As far as I can see, there are no database problems.

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2794
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: 500 error when publising articles in some categories

Post by ceford » Wed Feb 14, 2024 9:43 am

windtech wrote: Tue Feb 13, 2024 5:14 pm And I just get the red 500 error screen when debugging, and error reporting is set to maximum. So not any specific information.
Did you set Debug System to Yes? As well as Error Reporting to Maximum. We should expect to see a Stack Trace.

windtech
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Nov 20, 2006 1:25 pm

Re: 500 error when publising articles in some categories

Post by windtech » Wed Feb 14, 2024 9:49 am

Yes, I did that. It then still only displays the standard Joomla 500 error screen and no Stack Trace. I also tried it through error reporting in the php.ini file. That also does not give any more specific information. 

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2794
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: 500 error when publising articles in some categories

Post by ceford » Wed Feb 14, 2024 10:07 am

Does the Content / Categories list show anything odd? It might be a mismatch between a Category ID (at the right) and something else (a different component Category ID or an Asset ID).

windtech
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Nov 20, 2006 1:25 pm

Re: 500 error when publising articles in some categories

Post by windtech » Wed Feb 14, 2024 11:47 am

With help from Tim Davis, from Cybersalt Consulting, we found the cause of the error. A module used for showing sliding images from the latest articles in certain categories caused the problem. By disabling the module, everything works normally again :). Thanks to everyone for helping me solve the issue!


Post Reply

Return to “Migrating and Upgrading to Joomla! 4.x”