Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#10 | socialcalc-using-libraries-api-1906282.patch | 7.63 KB | willhallonline |
#8 | socialcalc-using-libraries-api-1906282.patch | 4.38 KB | willhallonline |
Comments
Comment #1
silkogelman CreditAttribution: silkogelman commentedSounds like you're suggesting Libraries API.
Comment #2
voipfc CreditAttribution: voipfc commentedYes, that's what I meant
Comment #3
nkorov CreditAttribution: nkorov commentedTell 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
Comment #4
willhallonlineI 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.
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.
Comment #5
willhallonlineComment #6
willhallonlineStarted adding new patch which also works for Sheetnode Views. Not complete. Will finish later today.
Comment #7
willhallonlineComment #8
willhallonlineRolled a new patch with support for sheetnode in views. Test please?
Comment #9
infojunkieThanks. The
libraries
dependency is missing from the info file. Also, the root of the SocialCalc library should besocialcalc
, notsheetnode
. So the call to get the proper location would belibraries_get_path('socialcalc')
.Comment #10
willhallonlineI have added the dependency into the .info file. The reason that I didn't use
socialcalc
butsheetnode/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:
sheetnode.css
andsheetnode.js
into js and css directories (css/sheetnode.css
&js/sheetnode.js
)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.
Comment #11
willhallonlineComment #12
infojunkieThanks, 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
andsheetnode_ckeditor
are not using thelibraries
module to locate their own libraries. It would be great to standardize the way libraries are brought in. What do you think?Comment #13
willhallonlineI 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?
Comment #14
infojunkieYes, makes sense. I've committed this fix and feel free to open new issues.
Comment #15
infojunkie