Jump to content
Sign in to follow this  
ksnyde

State Management and Build and Release

Recommended Posts

ksnyde

I have enjoyed using the Platform Pro theme but one thing that is confounding me is that when I bring a copy of the database (core tables and all extended tables) along with an exact replica of wordpress files to my local machine to do some local testing before releasing to production i can't reproduce the state. Admittedly it's close. All the WP content appears to have moved over and several of the PlatformPro configurations have moved over fine too. For instance the home page has a Feature Slider which works exactly the same in both environments. What doesn't work is the PlatformPro Global settings (aka, header logo, favicon, etc.). Also the MoreFooter option ... in production the default is to have it hidden and you can choose in the page editing mode to "show morefooter". In my test environment the default is NOT to show the morefooter but you can optionally choose to show it. Please help this is driving me crazy.

Share this post


Link to post
Share on other sites
kastelic
The reason is possibly the dynamic.css file. All your settings that affect the look of the site are stored in the database, and when you click "save changes" it creates a file called dynamic.css and that is the css file the browser uses. The browser can't get style info straight from the database. What you will need to do is go to your settings and just click "Save" to regenerate that dynamic.css file.

Share this post


Link to post
Share on other sites
ksnyde
I've checked and the dynamic.css files are the same. I actually don't think it's something that would make it into the CSS though. A good example of what I'm talking about is the custom header image. The default setting is: http://YOUR-SITE/wp-content/themes/platformpro/images/logo-platformpro.png This is the value that I get in my development environment after having loaded all known state from the production environment. In the production environment, I have a totally different setting. I looked in the dynamic.css file and it has no references to any PNG files so I don't think it can be managed here.

Share this post


Link to post
Share on other sites
Rob
To be clear, you export all the PlatformPro settings from Dashboard > PlatformPro > Global Options (scroll to the bottom), and then on your production site, you upload the file and it doesn't replicate correctly.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
kastelic
Is it a matter of just the URL being wrong? If so you can do a SQL search and replace. Something like this: [code] UPDATE wp_posts SET post_content = replace(post_content,"http://localhost/yoursite","http://yoursite.com" ); UPDATE wp_postmeta SET meta_value = replace(meta_value,"http://localhost/yoursite","http://yoursite.com" );[/code] I've used that before on other sites, you might have to look in the database to determine which tables to do the search on.

Share this post


Link to post
Share on other sites
ksnyde
rangelone, i have tried your suggested approach of handing of the .dat file via import and export process and it does indeed work in restoring the configuration but I'd still really like to understand where this state is stored on server as I'm trying to automate the release process between environments and would prefer to have a more automatable method than via the web interface.

Share this post


Link to post
Share on other sites
ksnyde
kastelic, I do run an update on the wp_options table as this is where most (all?) of the URL specific strings are stored. This is clearly required to move into the new environment but I'd expect that the Pageline settings would be ok afterward but they are not.

Share this post


Link to post
Share on other sites
ksnyde
kastelic, i do now see URL references in wp_postmeta as well. I've converted these over and I still don't seem to have located the location of the state management for PageLines settings. Bizzarre. Thoughts, anyone? Very desperate to understand this.

Share this post


Link to post
Share on other sites
Simon
PlatformPro has its settings in wp_options table. You cannot simply edit the database field as its stored in a serialized array, editing will break the array.

Share this post


Link to post
Share on other sites
ksnyde
pross, that's useful. Is there anything URL or environment specific in these settings? I make relative URL references in the URL properties so I'd guess it isn't. If that's the case then my DB import into the test environment "should" bring all of the configuration over with it. Do you know what the option_name value is for this serialised array?

Share this post


Link to post
Share on other sites
Simon
Its pagelines-settings in wp_options

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×