Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#42805 closed defect (bug) (worksforme)

Crash customiser if 'theme_mods_themename' option_value contains wrong url

Reported by: drivdigital's profile drivdigital Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9.1
Component: Customize Keywords:
Focuses: Cc:

Description

I migrate sites from test environments to live environments a bunch and have noticed this with every migration.

If you add a custom field to the customiser that allows for an image to be uploaded, if you move the domain, the customiser will fail, replacing the image url wth cannot get ID of said image.

Only way to fix it is to remove the URL within the database.

Change History (5)

#1 @drivdigital
7 years ago

  • Summary changed from Crash customiser if 'theme_mods_themename' table contains wrong url to Crash customiser if 'theme_mods_themename' option_value contains wrong url

#2 @westonruter
7 years ago

  • Keywords reporter-feedback added

How are you migrating sites from test to live? How are you handling the search/replace of URLs? If you are doing a plain search/replace than this will fail due to values being stored in serialized PHP values. To safely rename a URL in a database, you need to use something like WP-CLI's wp search-replace.

Last edited 7 years ago by westonruter (previous) (diff)

#3 @drivdigital
7 years ago

This also applies if you change your domain / url. You're able to change the URL within the Settings. What I'm thinking is that rather than failing (because it's javascript based), should there be a check to see if the image exists before outputting an error?

Our migration process usually ends up with blue velvet plugin doing it's magic. This ticket is more for the fact that this shouldn't output an error within javascript which causes the whole page to fail.

#4 @westonruter
7 years ago

Please provide some clear steps to reproduce the problem on a vanilla install of WordPress.

#5 @pento
6 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

I'm closing this ticket, as we required clear steps to reproduce this issue on a clean WordPress install.

Please reopen this ticket once you're able to provide these steps.

Note: See TracTickets for help on using tickets.