Solution if endpoints are not being created / Getting 404 Responses #9
Replies: 2 comments 4 replies
-
|
That's weird. Elementor, as far as i know, should mess up with WP urls. Also, this plugin (HTMX-API-WP) does a flush_rewrite_rules() on activation. See HXWP_Activate_Deactivate() class. I don't have access to WPML nor Polylang Pro. But i could test this with the free version of Polylang and also Bogo if that helps. Thanks for the heads up, @AndresCarignano |
Beta Was this translation helpful? Give feedback.
-
|
There's something weird with the custom rewrite endpoints and WP permalinks and I don't think it has anything to do with other plugins. I noted similar issue with another plugin doing pretty much the same thing svandragt/htmxpress#10. With this plugin, after installation and copying the example Reading the plugin code, I continued fiddling with my theme code and was able to get the correct HTML content as response to the browser, but it still oddly came as 404 response and didn't do the swap, by doing hx query Currently to get the plugin working, permalink settings have to be changed/re-saved by hand after plugin activation, after that the it seems to work as advertised in the repository readme. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
So I've been struggling for about an hour with this but found a solution.
add_rewrite_endpoint() was not doing it's thing so every request to the /wp-htmx/v1/* was returning 404.
This had never happened in other websites but this installation is particulary bloated with plugins. Hard to say which one is messing with flush_rewrite_rules() but it prevented the urls to be remapped. My suspicions are Elementor Pro or Polylang Pro.
Dirty solution:
Go to Permalinks page under Settings > Permalinks and click Save.
Found it here, for more info
Beta Was this translation helpful? Give feedback.
All reactions