-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite rules are not flushed on activation #10
Comments
Hi sorry for the bad first impression. I noticed that wp env did not properly run the flush rewrite rules (part of the plug-in activation) for me, but haven’t looked more into it. As a result the endpoints aren’t activated. This is what you’re seeing. Anyway if you go to Settings > Permalinks and press save it will flush them and everything will start working for you. Let me know if I can help and apologies for the first run experience. |
Thank's, I got the demo working. Seems that plugin has trouble writing redirects with the default "Plain" permalink setting. Changed it to "Post type" and plugin started working. Seen this setting being a requirement in some plugins earlier. Default TwentyTwentyThree block theme gives EDIT: tested on Mac with wp-env, but changing permalink setting does not seem to work on Debian with wp-env (rootless docker). The registered endpoint now shows up with On a side note, while trying to get it working with "Plain" permalink setting, there was some weird effects and differences between wp-env and VVV. While redirect path was not getting registered, I was able to get the demo page open from |
Similar issue noted in another plugin doing same sort of thing EstebanForge/HTMX-API-WP#9. |
Cheers I’ll have another look |
Thought to try this out on a minimal client WP ajax-widget project and partially out of personal interest in django+htmx development. I didn't get it to run after half a day trying to run the demo however.
Testing log
I set up the suggested wp-env development environment on Debian stable (NodeJS v18.13.0, Docker version 24.0.2 rootless).
wp-env start
gets the stock WP installation up and running with htmxpress-plugin activated ok and not producing errors. Htmx javascript file loads globally on site (from unpkg.com).When accessing demo urls I only get the classic Apache "Not Found" 404 page, access log:
Same results on Mac M1, Docker Desktop 4.19.0.
Another trial with Linux laptop and using VVV vagrant box which is personally more familiar tool. Installing htmxpress plugin as zip on the default "wordpress-one" site. Htmx script loads ok here as well. Accessing https://one.wordpress.test/htmx redirects to same url with ending slash and just shows the stock WP home page.
Access log:
Spent bit of time reading WP Rewrite Endpoints API docs and related code but didn't get any further yet...
The text was updated successfully, but these errors were encountered: