Create new content > sheetnode shows no spreadsheet functionality

Regw - November 24, 2008 - 15:19
Project:Sheetnode
Version:6.x-1.x-dev
Component:User interface
Category:bug report
Priority:normal
Assigned:kratib
Status:active
Description

I us TinyTinyMCE as an editor and it shows up similar to any other content type when I create a new sheetnode content.
I don't see an option anywhere to create a spreadsheet - just a box in the body in which I can start entering text using HTML formatting.

What should I expect to see?

Thanks
Reg

AttachmentSize
bug.jpg41.88 KB

#1

kratib - November 24, 2008 - 18:24
Assigned to:Anonymous» kratib

Below the input format section, you should see a spreadsheet as in the module's screenshot.

Did you try the 5.x version and did it work there?

Are you sure you successfully installed the SocialCalc files and patches?

If you're using Firefox, can you please download the Firebug add-on (https://addons.mozilla.org/en-US/firefox/addon/1843) and let me know if you see an error on the bottom-right section of your browser window?

Thanks for your help.

#2

Regw - November 29, 2008 - 22:50

Hi - I installed the Firefox fix - and it still doesn't show up (neither in IE).
Attached a view on what is installed on my server. My Hosting provider showed me that he successfully applied the Socialcalc patches.
I tried version 5.x a few weeks ago, but since it did not work on Drupal 6, I requested you to create a version for 6.x.
Thanks

AttachmentSize
sheetnodeinstall.jpg 99.6 KB

#3

kratib - November 30, 2008 - 07:47

Please rename the folders SocialCalc to socialcalc and Images to images (all lowercase). That's what the module expects. It might not make a difference if your host is running Windows, but better be safe than sorry :-)

Also, if you installed Firebug: does the browser status bar on the lower-right corner show JavaScript errors? If so, what do they say?

#4

Regw - November 30, 2008 - 21:40

I renamed the folders - and no, I don't see any errors.
Attached the Firebug window...
Thanks for helping me make it work - i really need this!

AttachmentSize
still not working.jpg 77.81 KB

#5

kratib - December 1, 2008 - 01:45

Okay let's debug the page together:

* Is your jquery.js version = 1.2.6 ?

* In Firebug > Script tab, do the following files show:
formatnumber2.js
formula1.js
socialcalc-3.js
socialcalcconstants.js
socialcalcspreadsheetcontrol.js
socialcalctableeditor.js
sheetnode.js
"
* Does the page source (View > Page Source) contain a script such as the following:

jQuery.extend(Drupal.settings, { [..] "sheetnode": { "value": "", "imagePrefix": "http://.../sites/all/modules/sheetnode/socialcalc/images/sc", "element": "sheetview", "editMode": true } });

* Does the page source contain a whose id=sheetview and class=sheetview? Does this div contain a script like this one:

  $(document).ready(function() {
    Drupal.sheetnode.startUp();
  });

* In Firebug > DOM tab, is there an object called SocialCalc?

* In Firebug > HTML tab, is there a div whose id="te_endcapv" inside the body? Is the div whose id="sheetview" populated with another nameless div, itself containing 6 divs?

Thanks for your patience and help :-)

#6

kratib - December 25, 2008 - 19:34

Okay let's debug the page together:

* Is your jquery.js version = 1.2.6 ?

* In Firebug > Script tab, do the following files show:
formatnumber2.js
formula1.js
socialcalc-3.js
socialcalcconstants.js
socialcalcspreadsheetcontrol.js
socialcalctableeditor.js
sheetnode.js
"
* Does the page source (View > Page Source) contain a script such as the following:

jQuery.extend(Drupal.settings, { [..] "sheetnode": { "value": "", "imagePrefix": "http://.../sites/all/modules/sheetnode/socialcalc/images/sc", "element": "sheetview", "editMode": true } });

* Does the page source contain a div whose id=sheetview and class=sheetview? Does this div contain a script like this one:

  $(document).ready(function() {
    Drupal.sheetnode.startUp();
  });

* In Firebug > DOM tab, is there an object called SocialCalc?

* In Firebug > HTML tab, is there a div whose id="te_endcapv" inside the body? Is the div whose id="sheetview" populated with another nameless div, itself containing 6 divs?

Thanks for your patience and help :-)

#7

Regw - December 1, 2008 - 17:18

It now all works! I presume the renaming of the folders fixed it - I just did not cleared my cache when I ran the test afterwards.
Thank you for all your help. I'm sure your advanced debugging suggestions will serve other users going forward.

#8

kratib - December 1, 2008 - 18:28
Status:active» closed

Happily marking as closed :-)

#9

Rosamunda - December 25, 2008 - 15:23

Hello there!
I have the same problem that the fellow RegW used to have.
I´ve applied all the patches with tortoise, and added all missing images.

* Is your jquery.js version = 1.2.6 ?
How do I know that?

* In Firebug > Script tab, do the following files show:
formatnumber2.js
formula1.js
socialcalc-3.js
socialcalcconstants.js
socialcalcspreadsheetcontrol.js
socialcalctableeditor.js
sheetnode.js
"

yes

* Does the page source (View > Page Source) contain a script such as the following:
jQuery.extend(Drupal.settings, { [..] "sheetnode": { "value": "", "imagePrefix": "http://.../sites/all/modules/sheetnode/socialcalc/images/sc", "element": "sheetview", "editMode": true } });

no

* Does the page source contain a whose id=sheetview and class=sheetview?
no

Does this div contain a script like this one:
  $(document).ready(function() {
    Drupal.sheetnode.startUp();
  });

yes

* In Firebug > DOM tab, is there an object called SocialCalc?
yes

* In Firebug > HTML tab, is there a div whose id="te_endcapv" inside the body? Is the div whose id="sheetview" populated with another nameless div, itself containing 6 divs?
no

Besides that, I´ve attached the list of errors that the page show.
I really hope you can help me out :)
Thank you!!

Rosamunda

AttachmentSize
errors_spreadsheet.png 106.2 KB

#10

Rosamunda - December 25, 2008 - 15:24
Status:closed» active

#11

kratib - December 25, 2008 - 19:35

Concerning the points where you didn't say yes:
* jQuery version: the file misc/jquery.js has a header with the version number. Open it with a text editor and check the version.
* jQuery.extend line: what does your page contain instead?
* You said "no" to a div with id="sheetview" and class="sheetview". However, you said "yes" to the script that calls startUp(). So the div is not there but the script is there?
* As for the "te_endcapv" div, the code has changed since this issue was closed so it is no longer in the same place. Let's not worry about that for now.

Your errors seem to show that the main sheet object is not created in sheetnode.js. We'll work on this issue once we make sure the prerequisites above are fixed.

#12

Rosamunda - December 26, 2008 - 03:38

When I entered again on the firebug addon, just to search for the jquery.extend thing, this is the error that appears:

Firebug's log limit has been reached. %S entries not shown. Preferences
SocialCalc.Constants is undefined
socialcalctableeditor.js?I()()socialca...itor.js?I (línea 3391)
[Break on this error] offsetX: SocialCalc.Constants.Tooltip... modifyable version to allow positioning
socialca...itor.js?I (línea 3391)
SocialCalc.Constants is undefined
startUp()()sheetnode.js?I (línea 58)
(?)()()2 (línea 83)
(?)()()jquery.j...e3Q%3D%3D (línea 1)
(?)()()jquery.j...e3Q%3D%3D (línea 1)
(?)()(function () { return a.call(this, D); },function () { return a.call(this, D); },function () { return a.call(this, D); }, function(), undefined)jquery.j...e3Q%3D%3D (línea 1)
(?)()()jquery.j...e3Q%3D%3D (línea 1)
[Break on this error] SocialCalc.Constants.defaultImagePrefi...= Drupal.settings.sheetnode.imagePrefix;
sheetnode.js?I (línea 58)
this.sheet is undefined
resize()()sheetnode.js?I (línea 84)
(?)()()sheetnode.js?I (línea 115)
(?)()(Object originalEvent=Event resize type=resize)jquery.j...e3Q%3D%3D (línea 1)
(?)()()jquery.j...e3Q%3D%3D (línea 1)
[Break on this error] if (this.sheet.SizeSSDiv()) {

Yes, the jQuery version is 1.2.6

About the "id="sheetview" and class="sheetview" issue, I´ve looked for that line inside the node view page source, and the edit page source, and didn´t appeared.

Thank you very much for your help!!!!

Rosamunda

#13

kratib - December 26, 2008 - 09:49

* You didn't answer about jQuery.extend. You should find that line in the HTML source page of the browser. What does it say?

* Open http://localhost/aplicacion_web/sites/all/modules/sheetnode/socialcalc/s.... Do you see the spreadsheet?

* In sheetnode.js, add the line

window.console.log(this.sheet);

at the very end of the Drupal.sheetnode.startUp() function. When you refresh the page, the Firebug console tab should show
Object parentNode=div#sheetview.sheetview

and you can click that line to examine the object. Is that the case?

#14

Rosamunda - December 26, 2008 - 21:31

I´m sorry this is what appears in the source page now:

<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, { "basePath": "/aplicacion_web/", "sheetnode": { "value": "", "imagePrefix": "http://localhost/aplicacion_web/sites/all/modules/sheetnode/socialcalc/images/sc", "element": "sheetview", "editMode": false } });
//--><!]]>
</script>

I´ve attached what appears when I open http://..../ssctrltest1.html

About the sheetnode.js file, now it looks like this:

Drupal.sheetnode.startUp = function() {
  SocialCalc.Constants.defaultImagePrefix = Drupal.settings.sheetnode.imagePrefix;
  SocialCalc.Constants.defaultCommentStyle = "background-repeat:no-repeat;background-position:top right;background-image:url("+ Drupal.settings.sheetnode.imagePrefix +"-commentbg.gif);"
  SocialCalc.Constants.defaultCommentClass = "tooltip";
  SocialCalc.Constants.TCendcapClass =
  SocialCalc.Constants.TCpanesliderClass =
  SocialCalc.Constants.TClessbuttonClass =
  SocialCalc.Constants.TCmorebuttonClass =
  SocialCalc.Constants.TCscrollareaClass =
  SocialCalc.Constants.TCthumbClass = "absolute";

  this.sheet = new SocialCalc.SpreadsheetControl();
  if (!Drupal.settings.sheetnode.editMode) {
    this.sheet.tabbackground="display:none;";
    this.sheet.toolbarbackground="display:none;";
  }
 
  this.sheet.ParseSheetSave(Drupal.settings.sheetnode.value);
  this.sheet.FullRefreshAndRender();
  this.sheet.InitializeSpreadsheetControl(Drupal.settings.sheetnode.element, Drupal.settings.sheetnode.editMode ? 700 : 0);
  this.sheet.currentTab = this.sheet.tabnums.edit;

  Drupal.sheetnode.focusSetup();
  Drupal.sheetnode.functionsSetup();
}
window.console.log(this.sheet);

Now this line does show up:
<div class="sheetview" id="sheetview">

The console tab shows only this (after refreshing and reinstalling the module using Devel):

Firebug's log limit has been reached. %S entries not shown. Preferences
SocialCalc.Constants is undefined
socialcalctableeditor.js?I()()socialca...itor.js?I (línea 3391)
[Break on this error] offsetX: SocialCalc.Constants.Tooltip... modifyable version to allow positioning
socialca...itor.js?I (línea 3391)
SocialCalc.Constants is undefined
startUp()()sheetnode.js?I (línea 58)
(?)()()3 (línea 83)
(?)()()jquery.j...e3Q%3D%3D (línea 1)
(?)()()jquery.j...e3Q%3D%3D (línea 1)
(?)()(function () { return a.call(this, D); },function () { return a.call(this, D); },function () { return a.call(this, D); }, function(), undefined)jquery.j...e3Q%3D%3D (línea 1)
(?)()()jquery.j...e3Q%3D%3D (línea 1)
[Break on this error] SocialCalc.Constants.defaultImagePrefi...= Drupal.settings.sheetnode.imagePrefix;

Again, many, many thanks for your help!!!

Rosamunda

#15

Rosamunda - December 26, 2008 - 21:29

sorry, forgot the attachment... :)

AttachmentSize
spreadsheet.png 52.99 KB

#16

kratib - December 27, 2008 - 15:41

Well, now we know that the plain SocialCalc test page doesn't even show... So we should concentrate on making ssctrltest1.html work before proceeding with the module.

* In the folder sheetnode/socialcalc, please do the following:

svn revert --recursive .

This will revert the socialcalc code to its original state before the patches. Then, try to open ssctrltest1.html again and let me know if Firebug displays any error.

* Alternatively, if you can post your Drupal site on the Internet, I'd be happy to check what's wrong.

#17

kratib - May 5, 2009 - 05:41
Status:active» closed

Closed unless anyone minds.

#18

pimousse98 - October 15, 2009 - 17:21
Status:closed» active

Hi, I'm having a similar issue.
The test of socialcalc works.
However, the spreadsheet does not show on the create spreadsheet page, nor on a simple view.

* Is your jquery.js version = 1.2.6 ? Yes

* In Firebug > Script tab, do the following files show:
formatnumber2.js Yes
formula1.js Yes
socialcalc-3.js No
socialcalcconstants.js Yes
socialcalcspreadsheetcontrol.js No
socialcalctableeditor.js No
sheetnode.js No
In addition I have socialcalcpopup.js
"
* Does the page source (View > Page Source) contain a script such as the following:
jQuery.extend(Drupal.settings, { [..] "sheetnode": { "value": "", "imagePrefix": "http://.../sites/all/modules/sheetnode/socialcalc/images/sc", "element": "sheetview", "editMode": true } });
I also have DHTML menu, so there's a line first for that, but the section about sheetnode says:
"sheetnode": { "value": "", "imagePrefix": "http://localhost/strategy/sites/all/modules/sheetnode/socialcalc/images/sc-", "element": "sheetview", "sheetsave": "edit-sheetsave", "editMode": true }

* Does the page source contain a div whose id=sheetview and class=sheetview? Does this div contain a script like this one:
$(document).ready(function() {
Drupal.sheetnode.startUp();
}); It says Drupal.sheetnode.start()

* In Firebug > DOM tab, is there an object called SocialCalc? Yes

* In Firebug > HTML tab, is there a div whose id="te_endcapv" inside the body?No
Is the div whose id="sheetview" populated with another nameless div, itself containing 6 divs? No, it contains the script shown above (sheetnode.start()). There are some hidden divs called 'edit-sheetsave', 'edit-sheetnode-nodeform-token' and 'edit-sheetnode-nodeform'. They are not inside of sheetview. I do get the save as template option.

Additionally I get the following error in Firebug:

this.spreadsheet is undefined
if (this.spreadsheet.SizeSSDiv()) {

and this.spreadsheet = new SocialCalc.SpreadsheetControl();
both from sheetnode.js (lines 168 & 135)..

My folders are named correctly (lowercase). I have applied the patch using cygwin. I'm using windows Vista/Wamp 2.
*edit* I tried turning off DHTML menu but it didn't fix it. * end edit *

Any help is appreciated!

 
 

Drupal is a registered trademark of Dries Buytaert.