It appears that automatic upgrades are deleting the socialcalc directory on upgrades. Sheetnodes needs to switch socialcalc to the sites/all/libraries folder so that upgrades do not delete it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

silkogelman’s picture

Title: SocialCalc Library should be switched to Libraries folder. » SocialCalc Library should use Libraries API

Sounds like you're suggesting Libraries API.

voipfc’s picture

Yes, that's what I meant

nkorov’s picture

Issue summary: View changes

Tell me how to fix it. please
Fatal error: require_once() [function.require]: Failed opening required 'sites/all/modules/sheetnode/socialcalc.inc' (include_path='.;C:\php\pear;includes/ZendGdata-1.12.13/library') in
sites\all\modules\sheetnode\sheetnode.module on line 311

willhallonline’s picture

I have rolled a patch against the dev version of the module (also works with the stable version) which allows you to move the SocialCalc library into sites/all/libraries/sheetnode.

  1. Download and install libraries module.
  2. Move (or download) the socialcalc library to sites/all/libraries/sheetnode - the library will be sites/all/libraries/sheetnode/socialcalc.
  3. Apply patch.

Have tested against current stable and dev version and seems to work well. Probably need doing to any other libraries that you are looking at including.

willhallonline’s picture

Version: 7.x-1.0-beta4 » 7.x-1.x-dev
Status: Active » Needs review
willhallonline’s picture

FileSize
2.29 KB

Started adding new patch which also works for Sheetnode Views. Not complete. Will finish later today.

willhallonline’s picture

willhallonline’s picture

Rolled a new patch with support for sheetnode in views. Test please?

infojunkie’s picture

Status: Needs review » Needs work

Thanks. The libraries dependency is missing from the info file. Also, the root of the SocialCalc library should be socialcalc, not sheetnode. So the call to get the proper location would be libraries_get_path('socialcalc').

willhallonline’s picture

I have added the dependency into the .info file. The reason that I didn't use socialcalc but sheetnode/socialcalc as the library location was that it meant less re-writing and also meant that all sheetnode libraries could be inside 1 folder (sheetnode/PHPExcel, sheetnode/ZendGdata-x.y.z/library), however, I see that it makes sense to do it as a separate library so I changed that also.

The only extra thing I was wondering about was:

  1. Should we put sheetnode.css and sheetnode.js into js and css directories (css/sheetnode.css & js/sheetnode.js)
  2. Can't remember what to do with stylesheets now being in a library stylesheets[all][] = socialcalc/socialcalc.css

Also as I am set up using Sublime Text with Drupal coding standards on, I am getting loads of errors :/ So probably could do with quite a bit more re-factoring.

Thanks.

willhallonline’s picture

Status: Needs work » Needs review
infojunkie’s picture

Thanks, this patch works for me. I don't think it makes sense to include the Drupal coding standards and CSS/JS locations in this issue, feel free to open a new one.

However, I noticed that submodules such as sheetnode_phpexcel, sheetnode_google and sheetnode_ckeditor are not using the libraries module to locate their own libraries. It would be great to standardize the way libraries are brought in. What do you think?

willhallonline’s picture

I agree with opening a new issue for coding standards. I will start one soon. With regards to css/js moving, I can make a new issue, just that a lot of path moving is in the patch overall and one would be building on another.

With regards to standardising the libraries, I think that it probably should be in sites/all/libraries. I haven't actually used any of these sub modules yet.

I would think that sheetnode_ckeditor should link into ckeditor module and probably should have that as a dependency. Possibly I feel that each of these sub modules should be run on a separate issue, rather than bundling all of the moving into this sheetnode/socialcalc issue?

infojunkie’s picture

Yes, makes sense. I've committed this fix and feel free to open new issues.

infojunkie’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.