Issue Details (XML | Word | Printable)

Key: SCAFF-248
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Cornelis Gouws
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Confluence Extension: Scaffolding Plugin

Data does not get saved when using the {table-data} macro

Created: 09/Sep/08 01:22 AM   Updated: 10/Sep/08 08:56 AM
Component/s: {table-data}
Affects Version/s: 3.0.0
Fix Version/s: 3.0.1

Time Tracking:
Not Specified

File Attachments: 1. Java Archive File scaffolding-plugin-3.0.1-SNAPSHOT.jar (497 kB)
2. PDF File sysinfo.pdf (84 kB)

Image Attachments:

1. 1 - start in template space.JPG
(98 kB)

2. 2 - Save as new page.JPG
(83 kB)

3. 3 - Ready to add rows and enter data.JPG
(75 kB)

4. 4 - Ready to save data.JPG
(77 kB)

5. 5 - Page saved no data.JPG
(54 kB)

6. 6 - Edit page again.JPG
(95 kB)

7. 7 - Enter new data.JPG
(94 kB)

8. Error1 - Java error on open for edit scaf page.JPG
(109 kB)
Environment: Windows 2003 5.2, Atlassian Confluence 2.8.2,Apache Tomcat/5.5.23


 Description  « Hide
When using the {table-data} macro to enter data it will allow you to add additional rows by clicking on the plus sign, but the data is not retained in the saved page and does not display in the preview. This happens with IE 7 and with Firefox 3.01 browsers. This seems to be a repeat of SCAFF-172 the status of which is resolved. When I use the usage example from the {table-data} macro it also does not work. {table-data:Myname}
|| Heading 1 || Heading 2 ||
| {text-data:Data 1} | {text-data:Data 2} |{table-data}

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
David Peterson added a comment - 09/Sep/08 02:09 AM
Hmm. Ok, I had been hoping that this would have been resolved with the JavaScript rewrite. It seems the problem may be on the server side somewhere...

I'm not exactly sure what could be causing the problem however, since it will usually output an error message if there is a problem. Are there any error messages in the web server log files?


Cornelis Gouws added a comment - 09/Sep/08 04:40 AM
no we checked both the Confluence and Tomcat logs but could not find anything that relates to scaffolding or the table-data macro.

David Peterson added a comment - 09/Sep/08 04:50 AM
Hmm. The problem is, I can't replicate the issue, which makes it hard to resolve....

What version of Java are you using? Scaffolding requires Java 5 or above these days.

Also, could you perhaps provide some screenshots? I don't know if they'll help, but I'll at least be able to see your working environment.


Cornelis Gouws added a comment - 09/Sep/08 07:47 AM
Please note that since I originally documented this bug yesterday, an unscheduled upgrade was done to our test environment to Confluence 2.9.1. The new sysinfo file is attached. I also realised that there were some Java errors / warnings when opening the scaffolding file for editing in IE 8 and Firefox 3.0.1. However please note that the same errors appear when editing a template not containing any scaffolding macros as well.

David Peterson added a comment - 09/Sep/08 07:50 AM
The 'AJS' javascript errors will be specific to Confluence 2.9. They've changed some of their JavaScript foundational code. I'm actually kind of surprised it's working at all in 2.9...

Can you confirm also that it's only table-data and/or repeating data that don't save correctly. If you have a page with just {text-data} at the top level, does it work as expected?


Cornelis Gouws added a comment - 09/Sep/08 08:04 AM
Indeed. If I simply remove the {table-data} tags around the text-data, it saves the data without a problem. As far as 2.9.1 is concerned I also noted that the Preview tab in editing a template document does not work anymore. I am unsure whether this is part of scaffolding but I suspect not.

David Peterson added a comment - 09/Sep/08 08:08 AM
The preview issue would be related to the AJS errors. We'll be working on sorting that out for the next version.

The problem with it not saving is essentially a mystery at present. As I said, I can't replicate it anywhere, which really makes it difficult to debug...


Liam Jones added a comment - 09/Sep/08 11:06 AM
I've just installed release 3.0.0 into our test environment and I'm getting the same behaviour here...

IE7, FF3 and Chrome all display the scaffold UI for the table-data correct and I can add/remove/reorder items but when I save the information isn't retained (though it is in the text-data and date-data fields I have outside the table-data). It's unusable in IE6 (it doesn't render the table-data UI correctly) but that may be an unrelated issue?

Nothing in any of the Confluence logs from what I can see either...

This is on Conf 2.8.1 Standalone w/ Java 1.6 (Update 6) on Win2K3.


David Peterson added a comment - 09/Sep/08 11:24 AM
Personally I tested FF3, IE6 and Safari and they all worked. IE6 is a bit ugly, but it is functional...

My guess is there may be some JavaScript funniness going on, but I have no idea what at present.


Liam Jones added a comment - 09/Sep/08 12:15 PM
Fiddler seems to indicate the data put into the table is getting to the server, don't know if what's submitted to the server is malformed in some way? (Is the double hyphen after the last mulitpart boundary correct?)

Scaffold:

{scaffold:TestScaffold}
{table-data:TestTable}
|| Text || 
| {text-data:TestText} |
{table-data}
{scaffold}

If I go to input mode in IE7 and add three rows containing the text one, two and three this is what gets sent back to the server according to Fiddler (headers slightly edited to keep the content from getting too wide).

POST /confluence/pages/scaffold/doeditscaffold.action?pageId=15466698 HTTP/1.1
Accept: <<snip>>, */*
Referer: http://heedevw03.nt.ad.local/confluence/pages/scaffold/editscaffold.action?pageId=15466698
Accept-Language: en-gb
Content-Type: multipart/form-data; boundary=---------------------------7d87e1f40678
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0 <<snip>>)
Proxy-Connection: Keep-Alive
Content-Length: 3627
Host: heedevw03.nt.ad.local
Pragma: no-cache
Cookie: seraph.confluence=<<snip>>; confluence.list.pages.cookie=list-content-tree; JSESSIONID=<<snip>>

-----------------------------7d87e1f40678
Content-Disposition: form-data; name="labelsShowing"

false
-----------------------------7d87e1f40678
Content-Disposition: form-data; name="restrictionsShowing"

false
-----------------------------7d87e1f40678
Content-Disposition: form-data; name="locationShowing"

false
-----------------------------7d87e1f40678
Content-Disposition: form-data; name="originalVersion"

42
-----------------------------7d87e1f40678
Content-Disposition: form-data; name="originalContent"

{scaffold:TestScaffold}
{table-data:TestTable}
|| Text || 
| {text-data:TestText} |
{table-data}
{scaffold}
-----------------------------7d87e1f40678
Content-Disposition: form-data; name="timestamp"

1220957873392
-----------------------------7d87e1f40678
Content-Disposition: form-data; name="title"

Scaff
-----------------------------7d87e1f40678
Content-Disposition: form-data; name="confirm"

Save
-----------------------------7d87e1f40678
Content-Disposition: form-data; name="scaffold.TestScaffold.TestTable.~template.TestText"


-----------------------------7d87e1f40678
Content-Disposition: form-data; name="scaffold.TestScaffold.TestTable.0.TestText"

one
-----------------------------7d87e1f40678
Content-Disposition: form-data; name="scaffold.TestScaffold.TestTable.1.TestText"

two
-----------------------------7d87e1f40678
Content-Disposition: form-data; name="scaffold.TestScaffold.TestTable.2.TestText"

three
-----------------------------7d87e1f40678
Content-Disposition: form-data; name="TestScaffold.TestTable.rowCount"

3
-----------------------------7d87e1f40678
Content-Disposition: form-data; name="selectedText"


-----------------------------7d87e1f40678
Content-Disposition: form-data; name="sel1"


-----------------------------7d87e1f40678
Content-Disposition: form-data; name="sel2"


-----------------------------7d87e1f40678
Content-Disposition: form-data; name="inPreview"

false
-----------------------------7d87e1f40678
Content-Disposition: form-data; name="mode"

scaffold
-----------------------------7d87e1f40678
Content-Disposition: form-data; name="xhtml"

false
-----------------------------7d87e1f40678
Content-Disposition: form-data; name="versionComment"


-----------------------------7d87e1f40678
Content-Disposition: form-data; name="newSpaceKey"

LLT
-----------------------------7d87e1f40678
Content-Disposition: form-data; name="parentPageString"

Lessons Learned Log
-----------------------------7d87e1f40678
Content-Disposition: form-data; name="moveHierarchy"

true
-----------------------------7d87e1f40678
Content-Disposition: form-data; name="position"


-----------------------------7d87e1f40678
Content-Disposition: form-data; name="targetId"


-----------------------------7d87e1f40678
Content-Disposition: form-data; name="pagePermissionTypeRadio"

view
-----------------------------7d87e1f40678
Content-Disposition: form-data; name="commaDelimitedEntityNames"


-----------------------------7d87e1f40678
Content-Disposition: form-data; name="viewPermissionsGroups"


-----------------------------7d87e1f40678
Content-Disposition: form-data; name="viewPermissionsUsers"


-----------------------------7d87e1f40678
Content-Disposition: form-data; name="editPermissionsGroups"


-----------------------------7d87e1f40678
Content-Disposition: form-data; name="editPermissionsUsers"


-----------------------------7d87e1f40678
Content-Disposition: form-data; name="labelsString"


-----------------------------7d87e1f40678--

David Peterson added a comment - 09/Sep/08 01:23 PM
Hmm. Ok, the problem is here:

Content-Disposition: form-data; name="TestScaffold.TestTable.rowCount"

This should be:

Content-Disposition: form-data; name="scaffold.TestScaffold.TestTable.rowCount"

Looks like a bug in the output code for the macro. Interesting that it doesn't show up here...

On it...


David Peterson added a comment - 09/Sep/08 01:37 PM
I've attached a snapshot build with a fix. Could you please test it to see if this resolves your issue? If so, we'll cut a new release shortly.

Liam Jones added a comment - 09/Sep/08 01:55 PM
Snapshot fixes it for me! Appreciate the quick turnaround David.

Cornelis Gouws added a comment - 10/Sep/08 02:44 AM
The snapshot works perfectly. Thank you kindly this has been really quick.
regards,
Cornelis.

Cornelis Gouws added a comment - 10/Sep/08 08:52 AM
David, are we ok to use this snapshot in production or should we wait for a packaged release / fix?

David Peterson added a comment - 10/Sep/08 08:56 AM
You should be fine to use it - this fix is the only addition so far. It will be rolled into the next official release also.