When I edit a page, the body WYSIWYG field shows as a textarea with the HTML content inside. This only happens for pages with content in that field, else a WYSIWYG field with no content is shown successfully. Hitting 'Edit summary', which is also empty, does show the WYSIWYG options.
The text format is set to Full HTML, so that it shows correctly on the front end.
I do have a warning and a couple of errors:
[Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
jquery-1.8.3.min.js - Failed to load resource: the server responded with a status of 404 ()
I recently moved this Drupal site from AWS to a simple WHM / Cpanel server, but I don't know what's different. I am not overly familiar with Drupal. The ckeditor plugin seems to be installed.
I have tried lowering the jQuery version, flushing the cache etc. Litespeed cache is running, but not when logged in.
Drupal: 7.56
CKEditor: 4.4.5.1
Update: By removing the async from the ajax call, I removed the warning. But any simple ajax call I make, with no data etc. to a completely new function that only echo's out some text still returns a 404.
Update 2: I can remove the AJAX XSS check and the WYSIWYG shows, but I think the issues is wider, in that all AJAX across the site seems to be broken. Paginated links don't work across the site.
Related
I'm using Contact Form 7 plugin to display a contact form on my Wordpress site.
When I open the page with the contact form on it, the console shows a 404 error like this (where /contact-us is the page URL):
https://www.example.com/contact-us/contact-form-7/v1/contact-forms/32/refill?_locale=user (404) from api-fetch.min.js.
This isn't a valid Wordpress ajax URL - the correct URL should be:
https://www.example.com/wp-json/contact-form-7/v1/contact-forms/32/refill?_locale=user
All ajax calls used by the plugin are wrong, including the form's submit URL, so when contact form is submitted, all it does is refresh the page.
Can anyone provide any help?
Thank you.
I have the same problem, & it went away when I disabled another plugin - Litespeed Cache.
If you have any caching modules, or any modules that intercept the contact form functions, disable them all & see if the problem goes away. You should be able to identify the culprit relatively quickly.
[ETA] LiteSpeed-specific fix:
In Wordpress admin, under LiteSpeed Cache / Page Optimisation / JS - disable "Javascript deferred" and "Javascript combine".
(Answer found at
https://theme.co/forum/t/contact-form-7-not-submitting-recaptcha-3-issue/53371/5)
Firstly, Once the user submits the contact form, It will automatically reload the page as it uses POST method where it sends the data entered by the user to the database or sends an email. So the page will be reloaded and if you dont want it to be reloaded then you can check online on how to make a form using AJAX. In wordpress, there might be plugins for it.
For the Error:
Please go to your FTP server and then delete the plugin you are using for the contact form and download it again. If it doesnt work then you can rollback to the previous version(maybe this can fix it)
We use a plugin that creates a content type and dynamically generates pages for that type. It works fine except that when when we upgrade plugins (especially The Event Calendar, which also creates a content type, but doesn't experience this problem), this sometimes (but not reliably) causes all of the page URLs generated by the plugin to stop existing. When you go to those URLs, you get a 404 error.
This problem can be fixed by going to the site's permalinks page and (without making any changes) saving the settings.
I looked for a solution that would prevent the problem from happening, but have not been able to find one. I wasn't able to figure out a way to mimic what happens when you save the permalinks settings for each site, and I haven't been able to figure out what might be triggering the problem. I currently "solve" the problem by using a Selenium script to go through each permalinks page in our multisite and click the save button on each automatically after I update plugins.
How can I:
Track down the source of the problem.
Set up a content type that will not unset itself in the wrong circumstances.
Failing either of those things, implement a backend solution that will do what I am currently doing on the frontend, but in a fully automatic way.
** Further Update **
I suspect my issue is something along the lines of a CSS background-url not being found (i.e. 404) or something similar. How would I use either Live HTTP Headers, Firebug (or another tool you may know of) to easily check this and identify the css url at fault? Thanks.
** Update **
These pages list the same issue as I'm having but unfortunately don't go into depth on how to diagnose it - they merely say to use Firebug or HTTP Live Headers - what I need to know is how do I use those tools to diagnose my issue
Same issue as I'm having here
Another one but not as detailed - only says Use the inspector in your browser
** END OF UPDATE ** ORIGINAL QUESTION BELOW **
My site is based on Wordpress.
I've noticed that the 'init' hook is being called twice.
I've read that this is usually caused by an internal 404 error in the headers that are loaded that is normally caused by something like a css background URL image not being found or similar type of fault.
All I have seen during my research regarding curing this issue is to identify it using Firebug or Live HTTP Headers or other similar browser add on.
I have both Live HTTP headers and Firebug and I'm struggling with how to use these tools to diagnose my issue.
I wondered if someone could give me the steps needed to help me track this problem down.
Thanks.
Your issues are not html related, html is "client" side and php is server side so php finishes running on your server sends the information to your browser and then it will find the resources required (the urls)
do_action is a php wordpress hook, it basically means do all actions hooked here...
What the other answers are saying that if a page is not found, it will redirect to another page and hence you have two wp processes run to a point (http is stateless so each page refresh loads wordpress).
You can use firebug to test http errors = right click on any page element, in the menu that appears, click inspect element and then in the new window click on console any http errors will be in red but only for the page loaded, but of course the page would not redirect because elements have not loaded, only if the page cannot be found. You can google firebird in firefox and you will find a install page for it.
In the 2nd link there is the answer which i believe is the issue, if you have a issue at all. You visit the link once, a bot visits again anything hooked to init will run on both occasions, you might use http://codex.wordpress.org/Function_Reference/current_user_can to make sure you verify the user before running the action.
If this is not the case de-activate all your plugins, install 2014 theme and try placing your action hook in the theme functions. It could be that someone used the code do_action('init') for whatever reason in one of your plugins or themes.
http://codex.wordpress.org/Plugin_API/Action_Reference
I am trying to set up a new custom post type and create a page (based off the custom post type archive template) and keep it private until it's ready to be published. I created a page and made it private, but it was visible to everyone (although not in the dropdown like it normally would be, just from entering the permalink URL). So I deleted that from the database (in phpMyAdmin) and tried again just leaving the page a draft. The permalink URL still shows the page template for the custom post type archive. I deleted the draft in phpMyAdmin and still the URL shows the page template (should be giving a 404). I tried this in a different browser where it had never been opened and it also gives the page template.
Does anyone have any idea why this is happening? Why isn't it working to privately publish and why aren't the deleted pages going away?
You propably only deleted the content of your page, but there are more relations to the page. See the database diagram on wordpress how posts are connected to other tables in the database as well. You'll have to delete every record pointing to that post!
I really recommend you not to play around in the database of wordpress, there's a reason why WP gives you the opportunity to administer everything in their admin panel!
To leave a page/post invisible to others, just don't publish it! As a draft, no one can access it unless he/she has access to your admin panel and the required rights to see drafts!
As soon as you publish it - it's published. You can also just use the preview view to see how it would look like! Why your private page was visible to everyone is another question, maybe you made some mistakes with your DB...hard to reckon without any further information. Try to set it up as a normal post/page and publish it privately, log out and see what happens!
The Drupal site is getting some page not found errors everyday and after sometime like a day or two, the custom error page 'page not found' kicks in instead of the front page (all other pages would still work). And when I flush all the cache in Drupal, the front page comes back alive again immediately. And this happens just for Anonymous users only. I went through the watchdog and all I can see is only a couple of 'page not found' messages at the end for a day.
Is the front page created with Panels(or just ctools page manager) ?
Then, in addition to setting front page in ctools interface itself, set the same value in Site Information admin page. It solves the problem in most cases.
If you have page caching(using core, boost or anything else) turned on, turn of ctools' caching mechanism. Using both will confuse the menu system. This is the reason for most 404 errors. You could find many similar threads in drupal.org as well.