Jump to content
junico

Update wp_options

Recommended Posts

junico    0
junico

Hi

 

I'm using Iblogpro4. What I need is to update some contents in the feature sildes and feature boxes.

I would like to apply these changes directly from the database

In the table named 'wp_options', we select option_name = pagelines_option & pagelines_options_redundant and we can get the values to update

 

unfortunately after my update query I lose the updated values and fall on the basic configuration.

What I forget to do to get  the expected result ?
 
Thx in advance
 

 

Share this post


Link to post
Share on other sites
Rob    547
Rob

I'm unclear what you're trying to do, but because iBlogPro4 is a deprecated product, it's very difficult for us to guide you about database changes.

 

You mentioned your update.  Do you mean updating WordPress or applying custom database changes?


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
junico    0
junico

Applying custom database changes !

 

Take an example, in the features set up tab, you decide to change the content of one of the following items : title, text, Media for any slide or box

or

you run an update query :

UPDATE    `wp_options` SET `option_value` = REPLACE(`option_value`, "XX", "YY")
WHERE     (`option_name` LIKE "pagelines_options%");

 

unfortunately after this update query I lose the updated values and fall on the basic configuration.

 

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

If I understand you correctly, you wish to use the database instead of simply using the options in the theme settings panel ?


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
junico    0
junico

Exactly !

Need to know the difference between

1/ we use the setting panel to update a title or a text area and save it and

2/ a simple query update in the wp_options table

 

Thx

Share this post


Link to post
Share on other sites
catrina    103
catrina

I'm afraid I'm not quite sure what the answer would be for this. Why do you need to update options in the database itself?


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
junico    0
junico

Hi catrina

 

Hope to be clear, my question is simple

 

1/ in the feature setting from the panel, you create a new slide or a new box and name the title 'Hello from Paris'. You save your change 

 

2/ in the 'wp_options' table from your DB you can get the following record :

 

O:7:"Options":73:{s:8:"features";a:5:{i:1;a:8:{s:5:"title";s:73:"<h1 class="ftitle">Hello from Paris</h1>"...

 

What I need to do by query is to change "Hello from Paris" by "Hello from LA"

 

When I run my query it restore features to default. :-(

 

What s Happen ?

Share this post


Link to post
Share on other sites
Simon    247
Simon

You can't edit a serialised array.

Share this post


Link to post
Share on other sites
junico    0
junico

could you develop a little bit more your answer ?

Is there any other solution to supply some info from a form directly to the DB (see above) ?

If else I should have to select an another theme

Thx

Share this post


Link to post
Share on other sites
Jenny    33
Jenny

If I understand correctly, you're wanting to update in the database directly because using the control panel in PageLines "restore features to default."  Unfortunately you cannot update in the database (as Simon stated above) because the data is serialized.

 

The more important thing to tackle would be to see why your features are reverting to default after you make a change. Could you disable ALL plugins (wordpress -> plugins) and then try to make the change in features?


Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
junico    0
junico

Thx Jenny,

I m going to test this but I don t understand why I ve to disable the plugins before...

I would like to understand what it happen when I select "save setup" button from "iBlogPro Feature Setup" page ?

I would like to do the same action but directly to the DB from update queries, the issue when I do that is that it restore the default information set up

How do we get around the issue of serialised array ?

Thx

Share this post


Link to post
Share on other sites
Simon    247
Simon

This is how serialized arrays work...

 

{s:5:"title";s:73:"<h1 class="ftitle">Hello from Paris</h1>

 

two stings there, title and the big html block....

 

see the numbers? 5 and 73?

 

title is 5 chars long, and the html string is 73 chars long.

 

so, if i change the word title to tit i HAVE to change the number to 3 see?

 

if even ONE of these numbers is wrong php will load it in as a blank array, and thats why you get reset settings.

Share this post


Link to post
Share on other sites
junico    0
junico

Thx Simon for these clear comments

 

Do I have the same issue with the V5 ?

 

If i put the right number (instead of 5 & 73), is that it could work ?

 

Thx

Share this post


Link to post
Share on other sites
Rob    547
Rob

Hi,

 

Unfortunately, we really cannot support modification of the database for the reasons Simon said. Whatever you're trying to ultimately achieve is most likely already available via PageLines Framework. I'd strongly recommend upgrading because when WP updates next it's going to do two things: 1.  likely make your theme dysfunctional; and 2. overwrite any changes to your database or result in corruption of the database, leaving you without a site.


Former PageLines Moderator, Food Expert and Raconteur

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


×