• Resolved philbee

    (@philbee)


    This has been frustrating me all day now.

    I’ve migrated a clients website to a new hosting, using FTP for themes and plugins, and Migrate DB Pro for the database and the media files.

    On this new server, everything runs fine – with one glaring exception: changes to customizer > Header Image are never saved to the database (wp_options > option_name: theme_mods_XXX).

    I’m normally running a child theme to Genesis.
    I’ve tried switching to a unchanged Studiopress Genesis Child Theme, to WordPress twentyfifteen standard theme, I’ve switched browsers, changed the width and height array of add_theme_support( ‘custom-header’, uploaded new images, and cropped old images.

    Nothing works.

    Header_image keeps being saved empty (s:12:”header_image”;s:0:””;s:17:”header_image_data”;O:8:”stdClass”:5:) into the database.

    Before I give up and replace Customizer with ACF Pro: is there a chance this has to do with the Media files themselves? Even though in the Customizer header images are displayed, can be selected and changed, just not saved?

    BTW: I have a copy of the website on a different server on the same hosting company, a local copy, and the original copy that runs on a Windows IIS server. Switching header images works on all three.

Viewing 15 replies - 1 through 15 (of 18 total)
  • jack randall

    (@theotherlebowski)

    have you made sure that all of the paths to directories and all mentions of the site in the database and the config.php file all reference the new site rather than the old location?

    Thread Starter philbee

    (@philbee)

    I’m looking through it all right now.
    There were a few funny guid in wp_posts, but apart from that, so far I’ve not seen anything strange.

    Some of the header images are even flagged as such in the Media listing, so somewhere WordPress seems to be aware of something.

    Thread Starter philbee

    (@philbee)

    Fun fact: things like “unused widgets” do get written into wp_options > theme_mods_mytheme. It’s only the header image informations that stubbornly only display live in the customizer, but then are not written into the options field.

    jack randall

    (@theotherlebowski)

    let’s try the ol’ wordpress troubleshooting basics: deactivate all plugins and revert back to the default theme and try the upload/save.

    clear the browser cache too, just to make sure that it downloads fresh copies of all the css and javascript files.

    Thread Starter philbee

    (@philbee)

    Tried that this afternoon, and right now again: all Plugins off, set Theme to twentyfifteen, use a new browser that never had this page open, so no caching.

    Makes no difference whatsoever.

    This is what get written into Customizer, time after time after time:

    data-customize-image-value="" data-customize-header-image-data="{"attachment_id":3915,"url":"","thumbnail_url":"","alt_text":"","width":954,"height":1300,"timestamp":["1464109068"]}"

    Customizer can select the images, crop ’em, display them, but not save them.
    I never liked the Customizer, but now I’m beginning to hate it.

    jack randall

    (@theotherlebowski)

    i feel your pain, i had some trouble with customiser not long ago and i’m trying to remember what it was and how i sorted it. i know it’s not much help to you but sit tight and i’ll wrack my brain for what i did… (it could take a while…)

    Thread Starter philbee

    (@philbee)

    That would be great – I’m extremely curious.

    My guess is it’s something really silly. Silly, but well-hidden.

    BTW: the only thing I can think of that is different for this install is that it currently runs on a preview URL, which I set in wp-config.php after installing WordPress. Maybe there’s a residue of the original domain targeted by the install somewhere. If so, I’ve been unable to find it in phpmyadmin.

    jack randall

    (@theotherlebowski)

    what do you mean by a preview url?

    Thread Starter philbee

    (@philbee)

    I’m pretty sure the preview URL thing is what messes with Customizers image selection.

    Does not work:

    Does work:

    • install WordPress using Installatron to an additional test domain: https://mydummydomain.com
    • move all Plugins and theme files using FTP
    • copy all database and media content using Migrate DB Pro
    • Change $table_prefix = ‘clienttableprefix_’; in wp-config.php
    • Login to WordPress as admin
    • Everything in WordPress works, including saving image selections in Customizer > Header

    Somewhere, WordPress Customizer probably has some remains of https://myclient.com and stumbles.

    So far, I have not been able to trace what Ajax is sending back to WordPress when I click on save in Customizer > Header. I would not be surprised to see something going wrong there.

    jack randall

    (@theotherlebowski)

    that sounds familiar. i could be wrong but because the customiser is creating a frame of the host site that you can live edit it has to the pull the contents of the site into itself and then it needs write permissions in order to create the changes. it might not be able to do all of that if it’s trying to do something on a subdomain rather than a root directory install…

    Thread Starter philbee

    (@philbee)

    Just tested: created a https://mydummy.hosting.link preview domain for https://mydummydomain.com, changed WordPress to use this as siteurl and home (adding to wp-config.php), logged in to WordPress.

    Everything seems to work, except image selection in Customizer > Header.

    Now searching in phpmyadmin for mydummydomain.com URLs.

    Thread Starter philbee

    (@philbee)

    The subdomain itself can’t be what’s messing Customizer up, I think.

    One of the working installs of this client website I have on myclient.mydomain.com, and things work as expected there.

    jack randall

    (@theotherlebowski)

    bit of a long-shot but are the permission on the uploads folder 755 recursive?

    Thread Starter philbee

    (@philbee)

    Yes, everything is set to 755.

    Since this setting did not change between using WP on the domain (targeted in installatron) and the preview domain (changed in wp-config and then manually in phpmysql), I still think it must be some well-hidden place where mydummydomain.com ist still active.

    jack randall

    (@theotherlebowski)

    hmm… have a look through this article and see if there are any places it mentions where you’ve not updated the url of the site. https://codex.www.ads-software.com/Changing_The_Site_URL

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Custom Header image information not saved to DB’ is closed to new replies.