• Hi there,

    Currently I’m trying to save my user changes to my theme folder using the overwrite theme option within the menu of create block theme.

    Whenever I do this, I’m getting a fatal error in WordPress.
    And then my debug log tells me:

    [19-Apr-2024 13:04:54 UTC] PHP Fatal error: Cannot redeclare turn_off_reject_unsafe_urls() (previously declared in /var/www/my-website/wp-content/plugins/create-block-theme/admin/create-theme/theme-media.php:101) in /var/www/my-website/wp-content/plugins/create-block-theme/admin/create-theme/theme-media.php on line 101

    I’ve also tried doing it from within the new full site editor menu. But this simply returns a 500 internal server error. With I think the same error message.

    This started happening after the latest update to the create block themes plugin.

    If it has to do with https and certificates, that could be the case because I have a self signed certificate on my local development machine. But this hasn’t changed since the update.

    I would like to save my user made changes in my full site editor to my block theme. I’m also not in the mood of manually copy/pasting all the code of all the changes I’ve made.

    I’ll try to revert back to the previous version to see if the problem persists for now.

    Please let me know if there is anything I can do to help diagnose the issue, or perhaps help figure out if this is something that happens to others.

    If you want me to make a clean WordPress install and replicate the issue, I’ll try that later.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter simbaclaws

    (@simbaclaws)

    Apparently this started happening from version 2.0.0 onward.

    (I also can not find a package.json for building the php files in the build folder, that’s an error I’m getting in version 2.0.0)

    include(/var/www/my-website/wp-content/plugins/create-block-theme/build/wp-org-theme-directory.asset.php): Failed to open stream: No such file or directory in /var/www/my-website/wp-content/plugins/create-block-theme/admin/wp-org-theme-directory.php on line 54

    Version 1.13.8 seems to still work for me accordingly and properly saves my theme changes.

    Jamie S

    (@spacedragon)

    I’m also experiencing this error with the latest version.

    I’ve tried commenting out all scripts in functions.php and disabling all plugins.

    Fatal error: Cannot redeclare alt_turn_off_reject_unsafe_urls() (previously declared in /home/my/website.com/wp-content/plugins/create-block-theme/admin/create-theme/theme-media.php:101) in /home/my/website.com/wp-content/plugins/create-block-theme/admin/create-theme/theme-media.php on line 101
    Plugin Author Jason Crist

    (@pbking)

    Thank you for the report. I’ve opened a github issue and will be tracking it there. I’m looking into it now and hope to have a fix in the next release.

    https://github.com/WordPress/create-block-theme/issues/584

    Plugin Author Jason Crist

    (@pbking)

    You may want to try deselecting the Localize Images option when saving a theme (with the latest 2.1 version). This should avoid the calls that are causing the issue (as a temporary stopgap).

    Plugin Author Jason Crist

    (@pbking)

    Should be fixed in the following PR which will be in the next release.

    https://github.com/WordPress/create-block-theme/pull/588

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Cannot redeclare turn_off_reject_unsafe_urls() in theme-media.php:101’ is closed to new replies.