WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
[resolved] Issue with NextGen on Multisite Install (8 posts)

  1. pixelyzed
    Member
    Posted 3 years ago #

    Hi there!

    I'm running into an issue with NextGen on a multisite install where I have several sub sites that are all based on the same "template" (same theme, design, plugs, etc). I use the New Blog Template from WPMU Dev to create each site from an base "template" site" (http://premium.wpmudev.org/project/new-blog-template).

    The issue I have is that, in the NextGen settings in WordPress' "wp_x_options" table (where "x" is the blog id), the path to the gallery is hard codded in the "ngg_options" "option_value" (a:71:{s:11:"gallerypath";s:29:"wp-content/blogs.dir/2/files/";" for example).

    So when I create a new site with the above plugin, that option remains set and the path reflects the gallery path to the original template blog (id=2 in my case) and not the new one.

    I can change that value in the DB for each site but, wouldn't it be better to use the actual blog id to "construct" the path and not hard code it in the db like this? In this site's case, I'll have 40+ "sub" sites to create from the template (this is a redesign of an existing site that was based on another tech) and more coming in the future so, if I could save myself the trouble of editing the value manually in Navicat for each site it would be awesome!

    Thanks!

  2. pixelyzed
    Member
    Posted 3 years ago #

    Another thing I'm running into on the same multisite install is that, on all the "sub sites" the main site owner is a user with restricted privileges set with the Members plugin. I set a new role with 24 specific capabilities but they are not an admin. For instance they do not have the Change Options and Change Style capabilities for NextGen.

    The problem is that, when they initially create a new gallery, they are correctly set as its author but, if they modify its description, the author gets set to the first admin in the Authors drop down in the gallery's edit page. Their name doesn't appear in that list at all as they don't have an admin role in their own site.

    I believe that the author drop down on the edit gallery page should list any user on that site with the Manage Gallery and Manage Others Gallery capability (which these users do in this network) and not just admins. That would solve the issue.

  3. pixelyzed
    Member
    Posted 3 years ago #

    OK,

    I'm now running into an even more serious issue. I created 7 sites yesterday without issue but today, the ones I create loose their settings and ngg_options gets "rewritten" after I update the gallery path for each new site then simply load the NextGen Options page. I update the path using Navicat (I just change the blog id number in the path) as the New Blog Template plugin doesn't do that automatically as it just replicates the settings of an existing site.

    The settings are changed from this:

    a:71:{s:11:"gallerypath";s:29:"wp-content/blogs.dir/14/files/";s:9:"deleteImg";s:1:"1";s:9:"swfUpload";b:1;s:13:"usePermalinks";s:1:"1";s:14:"graphicLibrary";s:2:"gd";s:14:"imageMagickDir";s:15:"/usr/local/bin/";s:11:"useMediaRSS";b:0;s:10:"usePicLens";b:0;s:12:"activateTags";b:0;s:10:"appendType";s:4:"tags";s:9:"maxImages";s:1:"7";s:10:"thumbwidth";s:3:"100";s:11:"thumbheight";s:3:"100";s:8:"thumbfix";s:1:"1";s:12:"thumbquality";s:3:"100";s:8:"imgWidth";s:4:"5000";s:9:"imgHeight";s:3:"600";s:10:"imgQuality";s:2:"85";s:17:"imgCacheSinglePic";s:1:"1";s:9:"imgBackup";s:1:"1";s:13:"imgAutoResize";s:1:"1";s:9:"galImages";s:1:"5";s:17:"galPagedGalleries";i:0;s:10:"galColumns";s:1:"0";s:12:"galShowSlide";b:0;s:12:"galTextSlide";s:11:"[Diaporama]";s:14:"galTextGallery";s:11:"[Vignettes]";s:12:"galShowOrder";s:7:"gallery";s:7:"galSort";s:9:"sortorder";s:10:"galSortDir";s:3:"ASC";s:10:"galNoPages";s:1:"1";s:13:"galImgBrowser";b:0;s:12:"galHiddenImg";b:0;s:10:"galAjaxNav";s:1:"1";s:11:"thumbEffect";s:7:"shutter";s:9:"thumbCode";s:35:"class=\"shutterset_%GALLERY_NAME%\"";s:5:"wmPos";s:8:"botRight";s:6:"wmXpos";i:5;s:6:"wmYpos";i:5;s:6:"wmType";s:4:"text";s:6:"wmPath";s:0:"";s:6:"wmFont";s:9:"arial.ttf";s:6:"wmSize";i:10;s:6:"wmText";s:23:"AAPARS - Jacques Landry";s:7:"wmColor";s:6:"000000";s:8:"wmOpaque";s:3:"100";s:8:"enableIR";b:0;s:7:"slideFx";s:4:"fade";s:5:"irURL";s:0:"";s:12:"irXHTMLvalid";b:0;s:7:"irAudio";s:0:"";s:7:"irWidth";i:320;s:8:"irHeight";i:240;s:9:"irShuffle";b:1;s:17:"irLinkfromdisplay";b:1;s:16:"irShownavigation";b:0;s:11:"irShowicons";b:0;s:11:"irWatermark";b:0;s:13:"irOverstretch";s:4:"true";s:12:"irRotatetime";i:10;s:12:"irTransition";s:6:"random";s:10:"irKenburns";b:0;s:11:"irBackcolor";s:6:"000000";s:12:"irFrontcolor";s:6:"FFFFFF";s:12:"irLightcolor";s:6:"CC0000";s:13:"irScreencolor";s:6:"000000";s:11:"activateCSS";b:1;s:7:"CSSfile";s:13:"nggallery.css";s:11:"installDate";i:1291999147;s:9:"imgResize";b:0;s:12:"hideDonation";b:1;}

    to this:

    a:1:{s:11:"installDate";i:1295305470;}

    All the options are blanked out and I simply open the Options page.

    I created the first 7 new sites with this method without issue (up to log ID 9) and starting at 10, the issue showed up. Anyone has any idea what might be causing this? I need to get this working again!

  4. pixelyzed
    Member
    Posted 3 years ago #

    OK, made some progress figuring out what is going on but no closer to figuring out why it does this or how to fix it.

    I just did a test on my local server with the same site described above but starting from a backup from yesterday where everything was working ok to eliminate any possibility of data corrupetion today..

    I created a new site again using the New Blog Template pluing (blog ID 10) and tested if Nextgen workd ok. Opened the Options page and all the settings are there although the Gallery Path option still points to my template blog (blog ID 2). If I now leave the "gallerypath" option to "wp-content/blogs.dir/2/files/" in ngg_options in the wp_10_options table or change the "2" in there to any single digit number, the settings remain and everything works (aside from the Gallery Path pointing to the wrong blog.dir folder). Remember that I made this same database change to blogs 3 to 9 without problem.

    But if I change that "2" to 10 or any 2 (and I'm guessing more than 2) digits number, as soon as I load the NextGen options page, all the settings are blanked including Gallery Path and, in the actual database, the ngg_options value in the wp_10_options table is "reduced or corrupted to " a:1:{s:11:"installDate";i:1295305470;} " as in my previous post.

    Can anyone think of what could cause this and why single digits blog id numbers are OK and double digit numbers are not?

    Please, I'm desperate to make this work as I'm already blowing my deadline on this project and this is the only snag I'm running into. I could leave all galeries to be created in "wp-content/blogs.dir/2/files/" for every site with an ID of 10 and above but I would really prefer for this to work correctly.

    Thanks!

  5. pixelyzed
    Member
    Posted 3 years ago #

    Alright... after further testing, it seems the New Blog Template plugin was causing the issue. If I create new sites without it, NextGen works correctly. Huge relief for me but new site creation just became much more time consuming!

    Thanks to anyone who read this! Will probably post in the wpmudev.org forum to warn them.

  6. Alex Rabe
    Member
    Posted 3 years ago #

    Anyway, thanks for your feedback. I will note this, that the template caused a problem

  7. pixelyzed
    Member
    Posted 3 years ago #

    Thanks Alex!

    Sorry for the panic mode but this is a large project for me and I hate like when I don't understand a problem like that ;) I should have suspected the Blog Templates plugin sooner as it was the new element here. Never had issues with NextGen before.

  8. Alex Rabe
    Member
    Posted 3 years ago #

    No problem, multisites have a couple of special condition. So there is always a chance that NGG didn't work correct... Never deeply tested it in this way. Appreciate your feedback on this...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.