Advertisement

4 Syntax Error Topic is solved

Need help with the Administration of your Joomla! 5.x site? This is the spot for you.

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
hfsh
Joomla! Apprentice
Joomla! Apprentice
Posts: 41
Joined: Fri Oct 14, 2011 1:08 am

4 Syntax Error

Post by hfsh » Thu Jun 20, 2024 1:23 pm

Hi everyone. My site is current on 5.1.1, updated a little over a week ago for all software including extensions, everything went smoothly. I've been away for over a week on business and came back to this syntax error. I'm quite perplexed to the cause as I believe the last updates all ran smooth and there were no issues after when i logged out of the administrator backend. the site is running however there are definitely issues with some items not functioning. I'm not sure if I need to reinstall some or all of the plugins we use, as there doesn't seem to be any information associated with this error. I cannot check for any updates, joomla or extensions, it does pop up this same error. Any assistanc is greatly appreciated.
You do not have the required permissions to view the files attached to this post.

Advertisement
SharkyKZ
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3004
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: 4 Syntax Error

Post by SharkyKZ » Thu Jun 20, 2024 1:24 pm

Enable debug and post stack trace. If you can't access Global Configuration, manually edit configuration.php file to enable debug.

jeffgilmore
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Mon Aug 14, 2023 4:13 pm

Re: 4 Syntax Error

Post by jeffgilmore » Thu Jun 20, 2024 2:09 pm

I'm getting this exact error. It just started today about 1 hour ago.

I did one update of the Linguise extension and things seemed OK after that.

I then updated 2 Regular Labs extensions and after that started getting this error.

jeffgilmore
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Mon Aug 14, 2023 4:13 pm

Re: 4 Syntax Error

Post by jeffgilmore » Thu Jun 20, 2024 2:14 pm

FYI, here is what gets logged from this error. It seems to be a broken JSON for extension timestamps in the TUF update library.

I don't fully understand how the extension update system works, but I'm guessing something is broken on either a vendor site or on some data a vendor included in an update. With update broken, it could be hard to fix though!

Code: Select all

2024-06-20T13:57:49+00:00	CRITICAL 172.70.114.172	error	Uncaught Throwable of type JsonException thrown with message "Syntax error". Stack trace: #0 [ROOT]/libraries/vendor/php-tuf/php-tuf/src/Metadata/MetadataBase.php(90): json_decode('', true, 512, 4194304)
#1 [ROOT]/libraries/vendor/php-tuf/php-tuf/src/Client/Repository.php(67): Tuf\Metadata\MetadataBase::createFromJson('')
#2 [ROOT]/libraries/vendor/php-tuf/php-tuf/src/Client/Updater.php(181): Tuf\Client\Repository->getTimestamp()
#3 [ROOT]/libraries/vendor/php-tuf/php-tuf/src/Client/Updater.php(148): Tuf\Client\Updater->updateTimestamp()
#4 [ROOT]/libraries/src/TUF/TufFetcher.php(117): Tuf\Client\Updater->refresh()
#5 [ROOT]/libraries/src/Updater/Adapter/TufAdapter.php(84): Joomla\CMS\TUF\TufFetcher->getValidUpdate()
#6 [ROOT]/libraries/src/Updater/Adapter/TufAdapter.php(50): Joomla\CMS\Updater\Adapter\TufAdapter->getUpdateTargets(Array)
#7 [ROOT]/libraries/src/Updater/Updater.php(263): Joomla\CMS\Updater\Adapter\TufAdapter->findUpdate(Array)
#8 [ROOT]/libraries/src/Updater/Updater.php(164): Joomla\CMS\Updater\Updater->getUpdateObjectsForSite(Array, '4', true)
#9 [ROOT]/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php(181): Joomla\CMS\Updater\Updater->findUpdates(220, 21600, '4', true)
#10 [ROOT]/administrator/components/com_joomlaupdate/src/Controller/DisplayController.php(110): Joomla\Component\Joomlaupdate\Administrator\Model\UpdateModel->refreshUpdates()
#11 [ROOT]/libraries/src/MVC/Controller/BaseController.php(730): Joomla\Component\Joomlaupdate\Administrator\Controller\DisplayController->getMenuBadgeData()
#12 [ROOT]/libraries/src/Dispatcher/ComponentDispatcher.php(143): Joomla\CMS\MVC\Controller\BaseController->execute('getmenubadgedat...')
#13 [ROOT]/libraries/src/Component/ComponentHelper.php(361): Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch()
#14 [ROOT]/libraries/src/Application/AdministratorApplication.php(150): Joomla\CMS\Component\ComponentHelper::renderComponent('com_joomlaupdat...')
#15 [ROOT]/libraries/src/Application/AdministratorApplication.php(195): Joomla\CMS\Application\AdministratorApplication->dispatch()
#16 [ROOT]/libraries/src/Application/CMSApplication.php(306): Joomla\CMS\Application\AdministratorApplication->doExecute()
#17 [ROOT]/administrator/includes/app.php(58): Joomla\CMS\Application\CMSApplication->execute()
#18 [ROOT]/administrator/index.php(32): require_once('/home/cnvc/site...')
#19 {main}

WebEZnet
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Thu Jun 20, 2024 1:41 pm

Re: 4 Syntax Error

Post by WebEZnet » Thu Jun 20, 2024 2:24 pm

I too am experiencing same issue with Joomla 5.1 and 5.0 on 5 different servers, a restoration back to a known working point did not solve issue.

NOTE, I have a J5.1 site that only has 2 extensions installed in it, akeeba backup and RS firewall, I disabled both of those and the Syntax error is still happening when you try to upgrade extensions or Joomla core.

another thread discussing same issue:
viewtopic.php?f=834&t=1009271

jeffgilmore
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Mon Aug 14, 2023 4:13 pm

Re: 4 Syntax Error

Post by jeffgilmore » Thu Jun 20, 2024 2:29 pm

One more thing. I tested a copy of my site created by Stageit extension 2 days ago. It too has started to have this problem when I'm pretty sure it did not 2 days ago and I have not changed anything.

Than makes me more concerned it might be a more general problem with the global update system.

Is anyone else seeing this issue?

And to clarify, the overall site as well as the administrative interface continue to work fine. The specific behavior is when you go to the Update Extensions screen and click on "Check for Updates" this error displays in the main part of the page:

Code: Select all

An error has occurred.
4 Syntax error
The rest of the general administrative interface still appears and works.

WebEZnet
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Thu Jun 20, 2024 1:41 pm

Re: 4 Syntax Error

Post by WebEZnet » Thu Jun 20, 2024 2:49 pm

One note, i have a Joomla 5.1 site running just fine on AWS, its fully upgraded and there are no errors when attempting to upgrade extensions or core.

But, my J5.1 sites that are on dedicated server and cPanelWHM are having this issue..

It does not seem to be affecting my Joomla 3+ or J4+ sites on same server..

hfsh
Joomla! Apprentice
Joomla! Apprentice
Posts: 41
Joined: Fri Oct 14, 2011 1:08 am

Re: 4 Syntax Error

Post by hfsh » Thu Jun 20, 2024 2:59 pm

I will mention I too am on a cPanel site. not sure if that's helpful.

for the debug and stacktrace, I can find where to put in the debug but it's been far to long for me to remember where to find the stacktrace information, any help there and i'd be happy to post it.

This is sounding like some compatibility with either the updater, or maybe related to cPanel hosting? Thanks to everyone chiming in that I'm not alone.

makeitso
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Thu Jun 20, 2024 12:36 pm

Re: 4 Syntax Error

Post by makeitso » Thu Jun 20, 2024 3:10 pm

I am on AWS and I am having the issue. Server is completely updated in regards to latest version of PHP, all other packages, and OS (Ubuntu server 22.04). I'm not using cPanel, my server was made as bare os only VPS and only has minimum packages of exactly what is needed. Joomla site is 5.1.1

hleithner
Joomla! Apprentice
Joomla! Apprentice
Posts: 24
Joined: Thu Feb 02, 2006 7:08 pm

Re: 4 Syntax Error

Post by hleithner » Thu Jun 20, 2024 4:01 pm

Can you please check again.

makeitso
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Thu Jun 20, 2024 12:36 pm

Re: 4 Syntax Error

Post by makeitso » Thu Jun 20, 2024 4:05 pm

Well that's fantastic my issue has been resolved on it's own with me doing anything. Can you explain what the issue was though?
You do not have the required permissions to view the files attached to this post.

hleithner
Joomla! Apprentice
Joomla! Apprentice
Posts: 24
Joined: Thu Feb 02, 2006 7:08 pm

Re: 4 Syntax Error

Post by hleithner » Thu Jun 20, 2024 4:06 pm

I suspect a broken cache entry at an edge server provided by cloudflare. I cleared the cache and now it should have a working one.

makeitso
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Thu Jun 20, 2024 12:36 pm

Re: 4 Syntax Error

Post by makeitso » Thu Jun 20, 2024 4:11 pm

Thanks a ton! Is there anything that I can configure on CloudFlare so this doesn't happen again in the future. I'm assuming there's nothing that I can clear that would allow me to fix this on my end correct?

hleithner
Joomla! Apprentice
Joomla! Apprentice
Posts: 24
Joined: Thu Feb 02, 2006 7:08 pm

Re: 4 Syntax Error

Post by hleithner » Thu Jun 20, 2024 4:27 pm

nope you can't clear the cache of your responsible server afaik. this happend now the second time. So maybe we have to find a better way. maybe we cache the data only for a limited time. (also not a perfect solution)

WebEZnet
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Thu Jun 20, 2024 1:41 pm

Re: 4 Syntax Error

Post by WebEZnet » Thu Jun 20, 2024 5:18 pm

I was gone for past hour, came back and now all my sites are working!! great news, but what the heck happened? what system caused this?

hleithner
Joomla! Apprentice
Joomla! Apprentice
Posts: 24
Joined: Thu Feb 02, 2006 7:08 pm

Re: 4 Syntax Error

Post by hleithner » Fri Jun 21, 2024 7:36 am

as explained above, it seems cloudflare cached an empty file, we will look into this and try to solve this issue on our end

hfsh
Joomla! Apprentice
Joomla! Apprentice
Posts: 41
Joined: Fri Oct 14, 2011 1:08 am

Re: 4 Syntax Error

Post by hfsh » Fri Jun 21, 2024 3:31 pm

hleithner wrote: Fri Jun 21, 2024 7:36 am as explained above, it seems cloudflare cached an empty file, we will look into this and try to solve this issue on our end
Much appreciated. This forum is so valuable I really appreciate everyone here.

Advertisement

Post Reply

Return to “Administration Joomla! 5.x”