Giter Site home page Giter Site logo

Comments (4)

dotsam avatar dotsam commented on July 18, 2024 3

This looks to be because the full site editor is passing through site_url() in its settings rather than home_url(), which is of course different in a subfolder installation like Bedrock. This was introduced in WordPress/gutenberg@9c5fe16 in the Gutenberg plugin, which was subsequently pulled in to core in https://core.trac.wordpress.org/ticket/54337, but I assume this probably needs to be opened as a bug in the Gutenberg repo.

For now, this workaround seems to work, but I haven't extensively tested things to see if anything else breaks:

add_filter('block_editor_settings_all', function ($editor_settings) {
  $editor_settings['siteUrl'] = home_url();

  return $editor_settings;
});

from bedrock.

iamlili avatar iamlili commented on July 18, 2024

Hi,

I cannot even load the site editor for the main TwentyTwentyTwo theme (using bedrock)

  • I did a clean install of latest Bedrock
  • ensured theme TwentyTwentyTwo was selected
  • navigated to the new site editor (wp/wp-admin/site-editor.php).
    • Got a white page with Error: "The editor is unable to find a block template for the homepage.". Full Error details below

Error: getHomepageParams: HTTP status error, 404 Not Found

at http://demo2.local/wp/wp-includes/js/dist/edit-site.js?ver=403e01f2b098b6a656118a51787581cb:8766:13
at async getHomepageParams (http://demo2.local/wp/wp-includes/js/dist/edit-site.js?ver=403e01f2b098b6a656118a51787581cb:8762:20)
at async redirectToHomepage (http://demo2.local/wp/wp-includes/js/dist/edit-site.js?ver=403e01f2b098b6a656118a51787581cb:8797:28)
at async reinitializeEditor (http://demo2.local/wp/wp-includes/js/dist/edit-site.js?ver=403e01f2b098b6a656118a51787581cb:9067:5)

I tried moving the theme to /web/app/themes, but that did not help.

It works fine with a regular install of WP (without bedrock)

Has anyone experienced this?

from bedrock.

iamlili avatar iamlili commented on July 18, 2024

For me the site editor doesn't load when you navigate to the link... wp/wp-admin/site-editor.php

This is because when the page first loads, the javascript is trying to ajax http://demo2.local/wp/?_wp-find-template=true (which results in a 404)

Notice the /wp/ in the url. It should really be loading http://demo2.local/?_wp-find-template=true

So this may be a bug with WP code. (not sure if this can be changed within the bedrock code)

The only way i can get the site editor to load is to load it with these extra url parameters
wp/wp-admin/site-editor.php?postType=wp_template&postId=twentytwentytwo%2F%2Fhome

(this bypasses the _wp-find-template request)

from bedrock.

retlehs avatar retlehs commented on July 18, 2024

no longer an issue as of wp 6.0

from bedrock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.