-
Hi, Thanks for a great plugin! I'm not sure if anyone else has encountered this. I tried this on a few sites, and it only happened on sites hosted on Flywheel (managed Wordpress hosting, heavy caching, shared WP code). When using the Legacy UI everything looks OK, but as soon as I switch to TSML UI or use the [tsml_ui] shortcode I get the error, "Error: not found (404) when loading data.". This does not happen on LocalWP (local dev environment for Flywheel). Tried different browsers and devices. Tried the "permalink" fix. Tried the "wordpress.com fix" code from this post. Tried with PHP 7.4 and 8.2. Tried with Wordpress 6.3.2 and 6.4.2. I set up a clean site to test this out without worrying about messing up production sites or getting interference from other plugins/themes. When I look at the inspector/console, it shows a 404 error on this request (the random characters vary): Note the "/www" before "/wp-content". The cache file is there, but the plugin can't find it because of the path/url. I'm not an expert, but I dug around a little in the code and created a temporary workaround (for the production site I needed this for), but I would love to have a more permanent (and professional :)) solution moving forward if possible. I'm not sure if this is a Flywheel issue (though I have not encountered this issue before with any other themes or plugins, or with the TSML Legacy UI), or if there is something specific to how this cache file gets accessed at runtime (it gets created just fine). I found that the issue (the extra "/www" getting added to the url/path) was coming from the WP_CONTENT_DIR constant. I am VERY hesitant to declare/change this constant for the whole site (like I said - never had issues before, and I don't want to risk breaking anything else that may depend on it), so for now I replaced WP_CONTENT_DIR in line 140 of /includes/shortcodes.php with a hard-coded path (without the "/www") and that seems to do the trick for now. I'm not sure if anything can/will be done about this, but I thought I'd at least bring it up so you're aware, and in case you have any permanent solutions. Or maybe I'm missing something very obvious, or a simple setting somewhere, or an entry in the documentation - but as long as it works I don't mind looking the fool for asking. :) Thanks in advance. Patrick |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi @bolsol! Sorry you're having issues. This does sound like some unexpected values for constant values on Flywheel. Do you happen to know the values of WP_CONTENT_DIR and also ABSPATH for the server that you're having issues with? We'll take a closer look. |
Beta Was this translation helpful? Give feedback.
Awesome. Thank you for your help!