Bug #6338

JSON is being parsed as string Array

Added by Rens Admiraal over 11 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-02-04
Due date:
% Done:

0%

Estimated time:
10.00 h
Has patch:

Description

We have a fluid template with some inline javascript. The JSON objects in it are being parsed as the literal string 'Array'.

It looks like fluid is parsing all array notations in the content instead of just parsing the arrays used in the viewhelper parameters. There is a workaround for this bug, just add a property to the json containing a viewhelper.

Not working:
flashes.push({
id: 'sponsorMeter',
flashvars: {
amount:5000,
maxAmount:700,
link: "<f:uri.action pageUid='{pages.sponsor}' absolute='true' />",
type:'zip'
},
parameters: {
wmode:'transparent'
},
width: 150,
height: 260,
src:'/<f:uri.resource path="Flash/sponsormeter.swf" />'
});

Working (parameters objects has changed):
flashes.push({
id: 'sponsorMeter',
flashvars: {
amount:5000,
maxAmount:700,
link: "<f:uri.action pageUid='{pages.sponsor}' absolute='true' />",
type:'zip'
},
parameters: {
link: "<f:uri.action pageUid='{pages.sponsor}' absolute='true' />",
wmode:'transparent'
},
width: 150,
height: 260,
src:'/<f:uri.resource path="Flash/sponsormeter.swf" />'
});


Related issues

Related to TYPO3.Fluid - Feature #39682: Disregegard { as Fluid variable when followed by a white spaceRejected2012-08-10

Actions
Has duplicate TYPO3.Fluid - Bug #8879: { } when using as JavaScriptClosed2010-07-15

Actions
#1

Updated by Sebastian Kurfuerst over 11 years ago

  • Status changed from New to Accepted
  • Assignee set to Sebastian Kurfuerst
#2

Updated by Sebastian Kurfuerst over 11 years ago

  • Target version set to 1.0.0 alpha 8
  • Estimated time set to 10.00 h
  • Branch set to v4 + v5
#3

Updated by Sebastian Kurfuerst over 11 years ago

  • Status changed from Accepted to New
  • Assignee deleted (Sebastian Kurfuerst)
  • Priority changed from Must have to Could have
  • Target version deleted (1.0.0 alpha 8)

we just discussed this again; and as there are workarounds (CDATA), we agreed upon not implementing this right now.
We first need proper testing for the syntax, and it would make the parser context sensitive.

#4

Updated by Bastian Waidelich over 11 years ago

  • Status changed from New to Closed

As there are workarounds (wrapping your scripts in CDATA tags) I close this issue for now.
If you don't agree or want to discuss this further, please re-open!

Also available in: Atom PDF