Forum

Please make sure that you have read the documentation and extensive resources provided on this site before posting your question!

Dynamic Content Gallery Resources

DCG Version 4.0 beta is now available for download and testing. This is a development version and not recommended for live sites. Read more here.

Note that the current stable release of the DCG is version 3.3.5.

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 3 characters - maximum search word length is 84 characters

Topic RSS
cloning blog, or changing url, breaks settings
Status: open
December 10, 2010
8:48 am
FredMc
Guest

I am using DCG 3.3.3. I have the task of making multiple blogs using one blog as a template. Each blog of course has its own url. To do this, I do a mysqldump of the template database, then do a find/replace of the url in the dump file. I make a copy of the template directory, change the database name in wp-config.php, create a new database and populate it with the dump file. I need to be able to do this progrmatically, not manually.

I am not using any of the plugins in the list in the "Known Plugins conflicts" post.

If the url changes from http://www.mydomain.com/health to http://www.mydomain.com/wealth all is well (only one letter was changed). However if it changes from http://www.mydomain.com/health to http://www.mydomain.com/stayhealthy when I go to the DCG settings page, there are no settings. If I click Image Management, then select Full URL, then click Save Changes, I get the message:
Dynamic Content Gallery Message #20: An error has occurred. Go back and try again.
Error with option: populate-method
Value:

On the blog page, I do see <div class="dcg">, two blank lines, then </div><!– end .dcg –>.

I have to do "Reset all the options to the Default settings" to continue.

The original settings were:
Image Management: full URL
Carousel Thumbnails: legacy
Gallery Method: one-category | Default Images folder is: not defined
Descriptions: auto
Javascript Options: jquery
Load Scripts: Home Page
Tools – Error Message options: on

mootools doesn't work, another Plugin uses JQuery.

Any help would be appreciated.

December 10, 2010
5:44 pm
Ade
Admin
Forum Posts: 2490
Member Since:
August 25, 2008
Offline

Hi,

First thing I would suggest is that you upgrade to the current version, v3.3.5.

Secondly, I can't see why the error method would be triggered on the 'populate-method' option. Basically, that message gets triggered when an empty settings value is sent to the db.

When you create a new clone, are the plugins kept deactivated until after the new db is imported?

Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
December 10, 2010
8:30 pm
FredMc
Guest

Thanks for your reply. After I posted I saw there was a new version, and I upgraded already. I just tried it again with the new version, and all plugins deactivated before I did the mysqldump (I hadn't deactivated them before). But, same result. I believe the reason it is giving that error message is because for some reason it isn't reading the settings from the database after it is imported. This is what the settings page says at that point:
Image Management: URL
Carousel Thumbnails:
Gallery Method: | Default image is: not defined
Descriptions:
Javascript Options:
Load Scripts: All pages
Tools – Error Message options: off

Now using DCG 3.3.5. Linux 2.6.12-1.1376_FC3smp #1 SMP Fri Aug 26 23:50:33 EDT 2005 i686 athlon i386 GNU/Linux with 5.0.51a-community MySQL Community Edition. WordPress 3.0.2. The domains shown here are live.

Here are the exact steps I'm doing manually, which I will do programatically as soon as I can make it work manually.
1. Blog http://health.nxmplus.com completely configured, including posts, plugins, StudioPress Genisis with child theme, widgets, etc.
2. Deactivate ALL plugins in health.nxmplus.com
3. mysqldump –extended-insert –quick –set-charset –add-drop-table –add-locks –all –disable-keys –complete-insert health_word > health_word.sql
4. download health_word.sql, and in a text editor (EditPlus), Find/Replace health.nxmplus.com -> gc4l.net and save as gc4lnet_word.sql
5. upload gc4lnet_word.sql
6. mkdir gc4l.net; chown apache:apache gc4l.net; rsync -a health/ gc4l.net
7. in gc4l.net, edit wp-config.php to change database name and change 8 "salt" lines.
8. mysqladmin create gc4lnet_word
9. mysql gc4lnet_word < gc4lnet_word.sql
10. log into gc4l.net
11. Activate DCG plugin.
12. Go to DCG settings page. No settings show. (see above). Click Image Maagement. None of the three radio buttons are selected. Selecte Full URL. Click Save Changes. Get error message #20.

I just can't fathom why simply relplacing health.nxmplus.com with gc4l.net in the mysqldump file makes it so the DCG plugin cannot read the settings. As noted in my first post, if I check "Reset all settings to the Default Setting" then go through and put the settings how I want them, it works fine. But doing that programatically looks very complex. I've visually compared the mysqldump file before and after doing that step, and there are few differences. I can post the values in wp_options for dfcg_plugin_postmeta_upgrade, dfcg_plugin_settings, dfcg_version, widget_dfcg-widget from the dump file as imported and then after I reset to default and redo the same settings. I may need to just save those values from the "after" database, and then in my program update the database directly. I haven't tried that yet – I've just been trying to clone it manually.

For what it's worth, on the widgets page, I put a Text widget in a side bar, and it isn't there after I do the clone. So DCG isn't the only problem I'm having – though that's the only other problem.

December 11, 2010
2:49 am
FredMc
Guest

I don't know what I did differently this time, but I just successfully cloned the blog, following the steps in my last post. So, consider this Case Closed. Thanks for your time.

December 11, 2010
3:20 am
FredMc
Guest

I found what I did differently – I forgot to edit wp-config.php, so it was using the database I'd cloned. When I changed wp-config.php to use the new database, things were broken, as reported above.

December 11, 2010
4:19 am
FredMc
Guest

I found the problem/solution. In wp_options, where option_name='dfcg_plugin_settings' there is this string in option_value:
…s:7:"homeurl";s:DDD:"http://mydomain.com/";… (… representing lots of other stuff!)

DDD needs to be the number of characters in "http://mydomain.com/" (not including the quotes). If it is even one off, the gallery will not show. So, in this example, the string should be
s:7:"homeurl";s:20:"http://mydomain.com/";

NOW the Case is Closed Smile

December 11, 2010
7:23 pm
Ade
Admin
Forum Posts: 2490
Member Since:
August 25, 2008
Offline

Fred,

Nice work tracking it down! Smile

Yes, the homeurl is stored in the DCG db options, therefore your sql replace statement will change the URL itself but not the string length.

Actually, the homeurl option is a legacy from an earlier version. I'll probably remove it in a future version.

Dynamic Content Gallery: Have you read the Configuration Guide and FAQ?
Forum Timezone: UTC 1

Most Users Ever Online: 28

Currently Online: theonsale, nloronacele
12 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

johnbroome: 13

sjpeaches: 12

speedyp: 12

CherylMcL: 10

littlemerry: 8

lsnoei: 8

Member Stats:

Guest Posters: 770

Members: 1297

Moderators: 0

Admins: 1

Forum Stats:

Groups: 2

Forums: 7

Topics: 978

Posts: 4293

Newest Members: chargers3, jwhetstone, robert, Mak-Donuts, kilerb, Marian Bamboi

Moderators:

Administrators: Ade (2490)