Plugin click redirect shows blank page.
-
I am dealing with a plugin that i wrote for a client site some years ago now, no code changes and last night, i received a call, the plugin suddenly stopped working and I’m baffled by it and wondering if anyone might have an idea to jiggle the handle here.
The plugin that i built essentially has a login page, which once validated, takes you to a screen with a couple of options. If you choose one of the options (button press), it redirects the user to another WP page which only contains a shortcode which runs the PHP that i’d written years ago.
This is the code of that button:
<button id="statsBtn" name="submit" class="submit-btn" type="submit" onclick="location.href=document.location.href='/mypage-setup'" value="submit">Enter App</button>
The WP page is entitled “mypage-setup” and it only contains a shortcode which contains PHP and external JS code. Last night (again, no code changes), the button press only displays a blank page. I’ve debugged and the button press does not execute the shortcode at all (when i put debug messages in the PHP file containing the shortcode, those messages DO display in the error log). I’ve removed the shortcode from the page entirely and replaced it with a simple paragraph, still no dice. Perhaps something to do with the onclick redirect? However, when i’m in the WP page editor for the page containing the shortcode and i choose ‘View Page’, the intended plugin code displays properly.
When i scrape the above ‘View Page’ URL and put it in another browser tab or different browser entirely, it displays as I would expect. However, if i attempt to access the page itself thru the plugin, it displays a blank page (no plugin output and debugging shows it never executes any plugin code), however the URL is the exact same URL as when i choose ‘View Page’.
I’m unsure what to check or try at this point. The intended shortcode doesn’t execute (hence no errors) and i’m not getting any Javascript console errors either. All of this code was used this past Sunday with no issues and it works 100% as it did on my local server. Frankly, i’m a bit baffled. Can anyone point out some possible candidates of things to try?
- You must be logged in to reply to this topic.