?
avatar truelai
truelai
13 Apr 2020

Steps to reproduce the issue

  1. Navigate to an affected article using the menu
  2. Go to https://robco.com
  3. Using the main menu, go to Products > Rubber Products
  4. Using the url of the page produces a blank content area

Expected result

See the article

Actual result

Error thrown when navigating using the menu. Blank page shown when using URL.
(e.g. https://robco.com/en/products/rubber-products)

System information (as much as possible)

Joomla 3.9.16
Ubuntu 18.04
PHP 7.3
Apache 2.4.29

Additional comments

joomla-json-db-check doesn't find anything to repair.

It seems the problem is here:

('{"robots":"","a...', Array)

But I don't know what table that's in or how to repair it.

RuntimeException: 
Error decoding JSON data: Syntax error in libraries/vendor/joomla/registry/src/Format/Json.php:78 
Stack trace: 
#0 libraries/vendor/joomla/registry/src/Registry.php(370): Joomla\Registry\Format\Json->stringToObject('{"robots":"","a...', Array) 
#1 libraries/vendor/joomla/registry/src/Registry.php(76): Joomla\Registry\Registry->loadString('{"robots":"","a...') 
#2 components/com_content/models/article.php(170): Joomla\Registry\Registry->__construct('{"robots":"","a...') 
#3 plugins/system/jsntplframework/includes/core/j3x/jsntplviewlegacy.php(398): ContentModelArticle->getItem() 
#4 components/com_content/views/article/view.html.php(42): JViewLegacy->get('Item') 
#5 libraries/src/Cache/Controller/ViewController.php(102): ContentViewArticle->display() 
#6 libraries/src/MVC/Controller/BaseController.php(663): Joomla\CMS\Cache\Controller\ViewController->get(Object(ContentViewArticle), 'display') 
#7 components/com_content/controller.php(118): Joomla\CMS\MVC\Controller\BaseController->display(true, Array) 
#8 libraries/src/MVC/Controller/BaseController.php(710): ContentController->display() 
#9 components/com_content/content.php(43): Joomla\CMS\MVC\Controller\BaseController->execute('') 
#10 libraries/src/Component/ComponentHelper.php(402): require_once('/var/www/robco....') 
#11 libraries/src/Component/ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent('/var/www/robco....') 
#12 libraries/src/Application/SiteApplication.php(194): Joomla\CMS\Component\ComponentHelper::renderComponent('com_content') 
#13 libraries/src/Application/SiteApplication.php(233): Joomla\CMS\Application\SiteApplication->dispatch() 
#14 libraries/src/Application/CMSApplication.php(196): Joomla\CMS\Application\SiteApplication->doExecute() 
#15 index.php(49): Joomla\CMS\Application\CMSApplication->execute() 
#16 {main}
avatar truelai truelai - open - 13 Apr 2020
avatar joomla-cms-bot joomla-cms-bot - change - 13 Apr 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 13 Apr 2020
avatar truelai truelai - change - 13 Apr 2020
The description was changed
avatar truelai truelai - edited - 13 Apr 2020
avatar ReLater
ReLater - comment - 14 Apr 2020

I can't reproduce the issue. I see the page.

But I don't know what table that's in

Presumably table #__content column metadata.

#3 plugins/system/jsntplframework/includes/core/j3x/jsntplviewlegacy.php(398): ContentModelArticle->getItem()

Keep your JSN template framework up-to-date and/or ask in their forum respectively.

avatar richard67
richard67 - comment - 14 Apr 2020

@truelai Can it be that the issue has been meanwhile solved e.g. by updating some 3rd party component? I can't reproduce it anymore using the links in the description. Yesterday I could reproduce it, and the error was shown in a box with some text about falang extension at the bottom.

avatar truelai
truelai - comment - 14 Apr 2020

Very sorry @richard67. I rolled back the snapshot. I can re-deploy it in its broken state if you want to check it out.

avatar richard67
richard67 - comment - 14 Apr 2020

No, just good to know about current status. But if you have an SQL export of the database when it was broken, that could be useful. And if you find out that it is related to a 3rd party extension, please let us know, too. Please check all your 3rd party extensions if they are up to date and if not, update them. Then check again if the error is there and let us know the result. It would be useful if you had a local of your site in broken state so you can test.

avatar HLeithner
HLeithner - comment - 14 Apr 2020

@truelai can you give us the value of the metadata field of the broken article? It seams that the json is broken.

avatar truelai
truelai - comment - 14 Apr 2020

I am unable to open the article in the CMS. I get:

Error decoding JSON data

@HLeithner @richard67 @ReLater, I have redeployed the broken version. You can see the error now. Please let me know when you've observed the bug.

avatar HLeithner
HLeithner - comment - 14 Apr 2020

Can you open phpmyadmin so similar tool and copy the raw data from the #__content table?

avatar truelai
truelai - comment - 14 Apr 2020

This what you're looking for?

mysql> SHOW COLUMNS FROM ptf5s_content;
+------------------+---------------------+------+-----+---------------------+----------------+
| Field            | Type                | Null | Key | Default             | Extra          |
+------------------+---------------------+------+-----+---------------------+----------------+
| id               | int(10) unsigned    | NO   | PRI | NULL                | auto_increment |
| asset_id         | int(10) unsigned    | NO   |     | 0                   |                |
| title            | varchar(255)        | NO   |     |                     |                |
| alias            | varchar(400)        | NO   | MUL |                     |                |
| introtext        | longtext            | NO   |     | NULL                |                |
| fulltext         | longtext            | NO   |     | NULL                |                |
| state            | tinyint(3)          | NO   | MUL | 0                   |                |
| catid            | int(10) unsigned    | NO   | MUL | 0                   |                |
| created          | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
| created_by       | int(10) unsigned    | NO   | MUL | 0                   |                |
| created_by_alias | varchar(255)        | NO   |     |                     |                |
| modified         | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
| modified_by      | int(10) unsigned    | NO   |     | 0                   |                |
| checked_out      | int(10) unsigned    | NO   | MUL | 0                   |                |
| checked_out_time | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
| publish_up       | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
| publish_down     | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
| images           | mediumtext          | NO   |     | NULL                |                |
| urls             | mediumtext          | NO   |     | NULL                |                |
| attribs          | varchar(5120)       | NO   |     | NULL                |                |
| version          | int(10) unsigned    | NO   |     | 1                   |                |
| ordering         | int(11)             | NO   |     | 0                   |                |
| metakey          | mediumtext          | NO   |     | NULL                |                |
| metadesc         | mediumtext          | NO   |     | NULL                |                |
| access           | int(10) unsigned    | NO   | MUL | 0                   |                |
| hits             | int(10) unsigned    | NO   |     | 0                   |                |
| metadata         | mediumtext          | NO   |     | NULL                |                |
| featured         | tinyint(3) unsigned | NO   | MUL | 0                   |                |
| language         | char(7)             | NO   | MUL | NULL                |                |
| xreference       | varchar(50)         | NO   | MUL |                     |                |
| note             | varchar(255)        | NO   |     |                     |                |
+------------------+---------------------+------+-----+---------------------+----------------+
31 rows in set (0.00 sec)

avatar richard67
richard67 - comment - 14 Apr 2020

@truelai No. Show columns gives the structure. We want to know the data.

SELECT * FROM `ptf5s_content` WHERE `id`=123;

with 123 being the id of the article which has that problem.

avatar truelai
truelai - comment - 14 Apr 2020

@truelai No. Show columns gives the structure. We want to know the data.

SELECT * FROM `ptf5s_content` WHERE `id`=123;

with 123 being the id of the article which has that problem.

Please see to the below file:
mysql.txt

avatar truelai
truelai - comment - 14 Apr 2020

I think this is the string that can't be loaded:

{"robots":"","author":"","rights":"","xreference":""}

avatar HLeithner
HLeithner - comment - 14 Apr 2020

@truelai your data is broken in this article. the field doesn't end after {"robots":"","author":"","rights":"","xreference":""} the field includes a tags= the complete field is

{"robots":"","author":"","rights":"","xreference":""}
tags=

if the problem is only in this article you can do

update `ptf5s_content` set metatdata="" WHERE `id`=82;

if all articles are broken you should look first if there are metadata that you still need.

select id,metadata from ptf5s_content
avatar truelai
truelai - comment - 14 Apr 2020

@HLeithner - Thanks very much. This is the fix!

Any idea why this happened? It was after an upgrade from 3.5.x and from php7.0 to 3.9.16 and php7.3

I also see a ton of broken sites online that seem to be affected by the same bug (found while searching for solutions)? Makes me think it's php related and all the sites that are broken may be due to shared hosts doing php updates?

avatar HLeithner
HLeithner - comment - 15 Apr 2020

It's possible that something has changed on the json parser... I'm closing this if there is another problem you can open this issue again or create an new issue.

avatar HLeithner HLeithner - close - 15 Apr 2020
avatar HLeithner HLeithner - change - 15 Apr 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-04-15 11:26:34
Closed_By HLeithner

Add a Comment

Login with GitHub to post a comment