In cell editor save action results in plain JSON response when php setting short_open_tag is off

Bug #907207 reported by Harm van Tilborg
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
chive
Fix Released
High
David Roth

Bug Description

When editing a cell (after double-clicking it) and saving it afterwards, I get a plain JSON response back, which looks like this:

{"redirectUrl":null,"reload":null,"refresh":null,"notifications":[{"type":"success","title":"Updated row","message":null,"code":"UPDATE `client` SET \n\t`street` = 'Backstreet'\nWHERE \n\t`id` = '4' \nLIMIT 1;","options":false}],"data":{"value":"Backstreet","column":"street","identifier":{"id":"4"},"isNull":"0","visibleValue":"Backstreet"},"js":[]}

I.e. no XHR request is made, just a regular POST - which Developer Tools of Chrome seconds.

The POST request goes to: /row/update, with the following form data:

schema:diagenda_knipgraag
table:client
column:street
attributes:{"id":"27"}
isNull:0
value:Backstreet

The content type of the response is correct: application/json, although I believe it should be handled differently, i.e. not showing JSON to the end user ;].

If you need more information, I'm happy to provide that.

Related branches

Revision history for this message
David Roth (davrot) wrote :

Hi,

thanks for the report. Unfortunately I am not able to reproduce this.
So you are using chrome (version x?) and a default lamp stack with chive latest (1.0)?
We already had some similar reports on this subject, but I could never reproduce this, but hope I can now with your help.

Revision history for this message
Harm van Tilborg (zeroxcool) wrote :

Here we go:
Chive 1.0

running on:
Apache/2.2.16 (Debian)
PHP/5.3.3-7+squeeze3

I might be able to give you some access, if you'd like.

Revision history for this message
Harm van Tilborg (zeroxcool) wrote :

Auch, and using Chrome 16.0.912.63 m on Windows.

Revision history for this message
David Roth (davrot) wrote :

No chance to reproduce it, also not on windows.
If you could give me access this would probably help. Email me.

David Roth (davrot)
Changed in chive:
status: New → Incomplete
Revision history for this message
Sebastian Schmidt (sebastian-schmidt) wrote :

As I wrote in my dublicate bug request - sorry for that - https://bugs.launchpad.net/chive/+bug/911285 I'm facing exactly the same problem.

Chive Version 1.0.1

Running on:
Apache/2.2.16 (Debian)
PHP 5.3.5 (incl. in Zend Server CE 5.1.0)

Testet browsers:
Firefox 6
Chrome 13

Revision history for this message
David Roth (davrot) wrote :

A community member found out that this error occurs when the setting "short_open_tag" is set to "Off", as we have on occurence of <? instead of <?php and this leads to an invalid form generation and finally to this error.

Fix commited to trunk. Will be available as .tar.gz / .zip soon. If you want to use the fix immediately, checkout chive via bazaar: bzr checkout: lp:chive

Thanks for the reports and feedback.

Changed in chive:
assignee: nobody → David Roth (davrot)
importance: Undecided → High
milestone: none → 1.0.2
status: Incomplete → Fix Committed
summary: - In cell editor save action results in plain JSON response
+ In cell editor save action results in plain JSON response when php
+ setting short_open_tag is off
David Roth (davrot)
Changed in chive:
status: Fix Committed → Fix Released
Revision history for this message
David Roth (davrot) wrote :

Updated archive packages (tar.gz/zip) are now available containing this fix (version 1.0.2)

Revision history for this message
Harm van Tilborg (zeroxcool) wrote :

Sorry for not responding earlier, but this indeed fixes the bug. Thanks David!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.