Task #56534

ResourceCache stores schemas even if the content is not valid json

Added by Rens Admiraal over 1 year ago. Updated over 1 year ago.

Status:Resolved Start date:2014-03-04
Priority:Should have Due date:
Assigned To:- % Done:

100%

Category:- Spent time: -
Target version:-

Description

When a schema is fetched from the server the json is stored in the ResourceCache. Currently there's no check whatsoever if the return value is valid json yes or no.

As in some cases it happens the server returns HTML (for example if the session is expired) the ResourceCache stores invalid values, which are stored in the browser and can not easily be cleared by the user.

Associated revisions

Revision 12aef1dc
Added by Rens Admiraal over 1 year ago

[BUGFIX] ResourceCache stores invalid schema data

When a session is expired the ajax calls for fetching the json
schema data from the server return html. This is now saved in
the ResourceCache basically disabling the user to work with
Neos in his current browser till the session storage is cleared.

This change makes sure that the html is not stored, and the promise
for fetching the schema is failed.

Change-Id: I8364fe8d86f2c9ec82e764829f2db0c3c2a41c20
Fixes: #56534
Releases: master, 1.0
Reviewed-on: https://review.typo3.org/28037
Reviewed-by: Aske Ertmann
Tested-by: Aske Ertmann
Reviewed-by: Rens Admiraal
Reviewed-by: Dominique Feyer
Tested-by: Dominique Feyer
Reviewed-by: Christopher Hlubek

Revision b6e90254
Added by Rens Admiraal over 1 year ago

[BUGFIX] Json parse regression in ResourceCache

Change I8364fe8d86f2c9ec82e764829f2db0c3c2a41c20 introduced a
regression. Because now the dataType is configured to be json
$.ajax will also return a json value. This caused a serie of
errors where Neos tries to parse objects to objects using
JSON.parse().

Change-Id: I2590cb4b61851c921f49861e14d0f85b8ae3e29d
Related: #56534
Releases: master
Reviewed-on: https://review.typo3.org/28071
Reviewed-by: Rens Admiraal
Tested-by: Rens Admiraal
Tested-by: Christian Mueller
Reviewed-by: Christian Mueller

Revision af96b45b
Added by Rens Admiraal over 1 year ago

[BUGFIX] ResourceCache stores invalid schema data

When a session is expired the ajax calls for fetching the json
schema data from the server return html. This is now saved in
the ResourceCache basically disabling the user to work with
Neos in his current browser till the session storage is cleared.

This change makes sure that the html is not stored, and the promise
for fetching the schema is failed.

Change-Id: I8364fe8d86f2c9ec82e764829f2db0c3c2a41c20
Fixes: #56534
Releases: master, 1.0
Reviewed-on: https://review.typo3.org/28081
Reviewed-by: Karsten Dambekalns
Tested-by: Karsten Dambekalns

Revision 5c61be0e
Added by Rens Admiraal 11 months ago

[BUGFIX] Json parse regression in ResourceCache

Change I8364fe8d86f2c9ec82e764829f2db0c3c2a41c20 introduced a
regression. Because now the dataType is configured to be json
$.ajax will also return a json value. This caused a serie of
errors where Neos tries to parse objects to objects using
JSON.parse().

Change-Id: I2590cb4b61851c921f49861e14d0f85b8ae3e29d
Related: #56534
Releases: 1.0

History

#1 Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/28037

#2 Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch master of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/28037

#3 Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch master of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/28037

#4 Updated by Rens Admiraal over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Applied in changeset commit:12aef1dc2a38da5e572b86dd1bd8b40716d9a636.

#5 Updated by Gerrit Code Review over 1 year ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch 1.0 of project Packages/TYPO3.Neos has been pushed to the review server.
It is available at https://review.typo3.org/28081

#6 Updated by Rens Admiraal over 1 year ago

  • Status changed from Under Review to Resolved

Applied in changeset commit:af96b45ba7bf82622879e6c04eaa8392446a2bb5.

Also available in: Atom PDF