You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because Bedrock returns the prefix /wp/ in site_url( '/generate', 'relative' ) (/wp/generate) while $_SERVER['REQUEST_URI'] contains only /generate[...], it always fails at the statement below:
Since site_url() returns the URL for the current site where WordPress applications are accessible, the best way to move forward is to use a callback filter (apply_filters) so anyone can customize it with a callback filter.
Hey @theodesp, I am confirming that @cguagenti suggestion solves previews pages 404 issue on non-WordPress standard installations where admin url differs from the siteurl. Can we hope to have that filter added to the official package, or maybe as an option in the plugin options? Many thanks.
Context:
I'm testing Faust with WordPress Bedrock, and due to the different structure, when previewing content, it results in a 404 error.
This issue is caused by the
$search_pattern
inhandle_generate_endpoint()
.faustjs/plugins/faustwp/includes/auth/callbacks.php
Lines 24 to 29 in 002687f
Because Bedrock returns the prefix
/wp/
insite_url( '/generate', 'relative' )
(/wp/generate
) while$_SERVER['REQUEST_URI']
contains only/generate[...]
, it always fails at the statement below:Suggestion
Since
site_url()
returns the URL for the current site where WordPress applications are accessible, the best way to move forward is to use a callback filter (apply_filters
) so anyone can customize it with a callback filter.Example of how to use the filter
The text was updated successfully, but these errors were encountered: