contentacms / contenta_jsonapi

Contenta CMS, the decoupled Drupal
http://www.contentacms.org/
GNU General Public License v2.0
328 stars 104 forks source link

null JSON preview on node view #372

Closed djvilione closed 5 years ago

djvilione commented 5 years ago

image

I noticed that on all node view pages. the JSON preview displays 'null'. It appears the initial display after a cache clear for example displays properly - I see the JSON output as expected. However on subsequent loads the JSON preview displays just 'null'. Has anyone else experienced this?

Also I noticed that the View/Edit/Delete admin tabs are missing on the node view pages. Is this by design?

djvilione commented 5 years ago

I should also mention, the null issue only appears while logged in. Anonymous visitors see the full json object. Perhaps this is a cache issue?

ludo1960 commented 5 years ago

Hello there, I have been playing about with contenta off and on for a couple of months now, so I kinda know what the score is. Don't hold your breath for answers from the developers, as they are impossible to get hold of..As for your NULL issue, If I understand you correctly, when you navigate to http://yoursite.com/recipes/fiery-chili-sauce you dont see the JSON code in the node view. If that is the case, then you have to look at your installation because I dont see that behaviour at all. The node view is complete apart from the image, as I believe that is a work in progress by the developers.

Good luck!

djvilione commented 5 years ago

Thanks for the response, Ludo.. and to the defense of the devs, I imagine they've had their hands full with JSON API making Core 👍

So when navigating to recipes/fiery-chili-sauce for example, the JSON object appears the very first time (after a cache clear or saving the node), but when reloading the page, it appears null like in my pic. This is the case while logged in. While logged out, the JSON object always displays no matter how many reloads. That's why I think this is tied to caching.

ludo1960 commented 5 years ago

Hello again, I don't see this behaviour at all, that's why I think something is amiss in your setup. I have tried editing our friend the fiery chilli and saving and reloading. All work fine, have another look at your setup.

h-archer commented 5 years ago

I can confirm this same problem on my setup when viewing a page.

The json preview only appears on the first page load. Subsequent page loads show null (as described in the first post and the image attached). Clearing the cache shows the json preview for one page load.

I am using Valet for php on macOS.

UPDATE: I just re-downloaded Contenta and did the whole install process again today. It seems that some core and contributed modules have been updated and I don't see this issue anymore. Seems to be fixed!

djvilione commented 5 years ago

UPDATE: I just re-downloaded Contenta and did the whole install process again today. It seems that some core and contributed modules have been updated and I don't see this issue anymore. Seems to be fixed!

Excellent! I'll composer update and verify.

djvilione commented 5 years ago

UPDATE: I just re-downloaded Contenta and did the whole install process again today. It seems that some core and contributed modules have been updated and I don't see this issue anymore. Seems to be fixed!

Excellent! I'll composer update and verify.

Verified, problem is gone. Thanks @hga77 for the update

e0ipso commented 5 years ago

Thanks for circling back and closing this one.