So I think I jumped the gun on declaring the one issue solved as they do seem separate issues so I've opened a new one; with clearer eyes after a good night's sleep I see that there are no tabs displayed on the spreadsheet as there are in the example socialcalc and so no way to save the data -- and perhaps related, the spreadsheet isn't displayed when editing a saved sheetnode. No errors on add but when editing I get:

preg_match() expects parameter 2 to be string, array given in /var/www/includes/bootstrap.inc on line 777.

I'm a bit lost right now and could use some troubleshooting direction.

CommentFileSizeAuthor
#3 sheetnode.module.patch1012 bytesDave Kinchlea

Comments

infojunkie’s picture

Version: 6.x-1.3 » 6.x-1.x-dev

Do you get that error when attempting to open a sheetnode that you had previously saved?

Concerning the observation that "there are no tabs displayed on the spreadsheet", what do you mean? Your screenshot in the other issue did show tabs in the spreadsheet control.

Do you have a test site that I can visit to see this error in action?

Dave Kinchlea’s picture

Yes, after saving from the Drupal form and trying to "Edit" the node.

So, the "tabs" I was speaking of are probably not supposed to be there (I've not seen a picture of a working version, I was going by the /sites/all/modules/sheetnode/socialcalc/ssctrltest1.html, I think I now know that those aren't part of it). I was expecting them to "save" the worksheet. I now think I understand that the regular Save button is supposed to be used and the "Format" save button is just for saving state (but perhaps should do the same thing?).

When I save I see the Revision Log being populated with content like:

set A1 text t a1

set B1 text t b1

set B2 text t b2

set C2 text t c2

set C3 text t c3

set D3 text t d3

but those are not showing up in the node revision table. In any case, there is nothing being populated in {sheetnode}.

I have created an account on http://www.gatedev.com -- infojunkie/sheetnode ---- this is my devel server so the account won't last long but it has all the privs required to /node/add/sheetnode.

Dave Kinchlea’s picture

StatusFileSize
new1012 bytes

It's not THE problem I am seeing but I did find A problem where "sheetnode" wasn't wrapped in curly brackets in sheetnode_update(). Patch attached.

infojunkie’s picture

Thanks for the patch. It doesn't affect your case though since this code kicks in when updating a node.

Concerning your problem, I can confirm that the value isn't getting saved, but I don't know why yet. For starters, can you please disable the Javascript optimizer? I never tested with it so I'd like to rule that out before continuing.

Dave Kinchlea’s picture

Shoot, sorry, I had restored my DB and forgot to turn that off again ... it does make debugging difficult doesn't it? I'll happily do anything else you ask as well, just ask!

infojunkie’s picture

Can you please place the following script in sheetnode.js, function Drupal.sheetnode.save:

alert($('#'+Drupal.settings.sheetnode.editId).val());

right after the line

$('#'+Drupal.settings.sheetnode.editId).val(this.spreadsheet.CreateSpreadsheetSave());

When you save, you should get a message box with the value of the sheetnode. What do you see?

infojunkie’s picture

Also, please turn off the Ajax module and test without it. It seems to be hooking on many form events and it might be clashing with Sheetnode.

Dave Kinchlea’s picture

Ajax was disabled successfully. [ok]
Ajax plugin - comment was disabled successfully. [ok]
Ajax plugin - disable_redirect was disabled successfully. [ok]
Ajax plugin - quicktabs was disabled successfully. [ok]
Ajax ui was disabled successfully. [ok]
Ajax plugin - wysiwyg was disabled successfully. [ok]

Alert is in place ... and I have successfully saved and re-edited a spreadsheet. Removing the alert stopped the saving from happening, putting it back it got it back to working. I didn't expect that.

infojunkie’s picture

There is a module that seems to cause a race condition with Sheetnode. It is most probably a client-side module that performs some Javascript logic on the form. If we can isolate which module causes the failure to save, then I can work locally to fix that issue.

Dave Kinchlea’s picture

Okay, thanks for your help ... I'll let you know when I find the module, it is great to have this working!

Dave Kinchlea’s picture

And the winner is.... http://drupal.org/project/ajax ... specifically ajax_ui ... I'm not sure why disabling it last night didn't seem to work, I guess there must have been some caching going on... in any case, I have all my modules but ajax_ui enabled and it works ... I think that's okay for me as I can work around it in a similar fashion as I do with http://drupal.org/project/form. So its a bug if you say its a bug; my problem is solved.

Thanks for your help!

infojunkie’s picture

Thanks Dave for your patience and feedback! I definitely need to try ajax_ui and figure out why it clashes with sheetnode. Cheers!

PS. Don't forget to remove my username/password from your dev site :-)

infojunkie’s picture

Title: Spreadsheet not displaying on edit and no tabs showing on add » ajax_ui prevents sheetnode from saving data
infojunkie’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Closing old issues. Reopen if needed.