Blank Admin page / unable to save any settings - php

I am having an extremely frustrating issue occuring in my theme. I was doing some dev work on my theme and suddenly, I started experienceing an issue where I was unable to save any changes made in the wordpress customizer.
I restarted thinking it was my browser, I tried to log back in and .../wp-admin was blank, .../wp-login got me a 404 error. Going to my URL the site was sitll live without any issues with the changes I tried to push through live and working. If I keep a second browser window open and make changes to the customizer they occur but it says it can't save.
I tried the following:
renamed plugins folder - didnt work
back out of all the code i added in my dev session (to my knowldegde)
Only thing that made my admin page and login page work was changing my theme.
This is the frustrating thing about it, I cannot figure out what is causing these errors, chrome dev console is giving no unusual errors, the php error log is giving me nothing I havent already seen prior.
This is my last ditch effort to save a months worth of work I dont know what to do, I have not been searching for a solution for 8 hours with 0 progress.
How could I find out what is causing this bug?
Please help

You said you think you removed all of your recent changes, but you must have missed something. Do you have any other backup versions of the theme, even fairly old ones? If so, you could try adding in parts, piece by piece, until you find the problematic code.

Related

Wordpress front-end only works when logged in as an admin

Front-end of WordPress doesn't work - shows a white box with no text, just body tags.
I'm using XAMPP, local development. When logged in everything works.
I don't know if it will be the same on a live server, haven't tried yet, but seems like a weirdly persistent issue.
It was working fine, until 5.1 updates, but I mostly was logged in during development, so cannot pinpoint the exact time when it started.
I have the WordPress reinstalled from the dashboard, the theme doesn't affect it - it has the same issue on WordPress standard themes. Plugins/no plugins - doesn't affect it either.
Cleaned cache multiple times (wp, browser).
My last resort would be to reinstall Wordpress completely in Xampp, but thought, maybe such drastic measure isn't required.
It is the same in every browser.
The has nothing in it, literally.
If anyone knows, what could be the issue? It doesn't show any errors.
TL;DR
Maintenance mode with missing maintenance.php was throwing white page with 500 Server Error.
This is probably not going to be helpful to many people, yet I feel that I have to update this as I found the problem causing this.
I have moved the theme a lot: from local to hosting, back to local dev, had my HDD replaced, etc. It's been a while and I overlooked one major thing. I haven't touched the theme code for almost 3 years, and a couple of days ago I decided to go through it with a completely fresh install of WordPress. And I have found after inspecting all the files, what was causing it now. I do feel a bit stupid for how simple the solution to my issue is.
It's the maintenance mode. I had maintenance mode activated and while moving the theme files around maintenance.php got removed. facepalm
There might be an error in your browser's console window. If there is any error then it might causes issue for loading stylesheets.

Getting "\" sign inside HTML script in joomla

For a few months now I've been working on a Joomla-site and everything was OK till today.
Today I started working on one module that I finished yesterday, but I got something strange.
First, when I logged in today, this is what was waiting for me:
As I starting working, I saw that this error doesn't affect my work. But after a while, I saw something strange:
Everytime I was saving, entering or exiting the module I was editing, inside my HTML script i got this character: \.
[]
This never happened before, and I've made/edited several Joomla templates, I have some knowledge in PHP, HTML and CSS, but never got this kind of error/stuff.
Is it possible that this happened because of the error I got when I logged into my admin panel (Error: Your host needs to disable magic_quotes_gpc to run this version of Joomla!) and should I wait for my host to resolve this or is it possible that something else happened, maybe something I did and didn't notice?

Eclipse PHP debugging only works on first page (doesn't follow links)

I am having trouble getting PHP web debugging setup in Eclipse. I am able to step through the code on the main page http://localhost/app/index.php.
But as soon as I navigate to another page within this same app (being routed through index.php) the debug in Eclipse no longer picks up any of the routing (just shows as <terminated, exit value: 0>http://localhost/app/index.php).
In the past (6-8 months ago), I had this working with the same versions of Eclipse, PHP, XAMPP, Zend debugger, etc. I even made notes on how everything was setup, but for the life of me I cannot get it work again.
I do notice that the debug_host, start_debug, debug_port and other debug related URL params go away as soon as I navigate away from the original page. In some cases, I can copy and paste them onto the end of the new URL and it will send that page through the debugger, but this time none of the Ajax calls hit the debugger.
I have Googled to my heart's content with no luck, so any insight into what I may be doing wrong is greatly appreciated.
Just wanted to follow up on this in case someone comes across it via a search.
I'm not sure of the actual reason that the Debug all pages option doesn't work, but by selecting Start Debug from, entering the URL to my index page, and then checking Continue Debug from This Page seemed to solve my problem.

Page does not change after file update/upload

I really need help on this one.
I am working on a site and made some changes on some lines, but after I uploaded it there were no changes happening. I have cleared my cache, even did ccleaner and a restart. Open the file again via ftp and the code is there but when I go to the site nothing has changed. I have also tried different browsers.
Sorry for bad English, but I really needed your help.
edit 1: i have tried deleting the file and i get 404 page. But when i uploaded it again, with the changed code, it display no changes at all again.
edit 2: i really think it's on the server side problem and any idea about it would be helpful, not some file being misplaced or something. i know i am working with the same file and put it on the right folder.
EDIT 3: SOLVED, the technical personnel said that the server is running eaccelerator and mtime was disabled and was causing the problem.
Correlate to a localhost (xampp or similar), i.e. if you don't see the same issue than you know it must be a transfer issue. Divide and Conquer in this manner to troubleshoot.

Wordpress wp-cron.php looping and overloading server resources

I am working on a site now that seems to have an infinite loop for the wp-cron.php file. My host recently limited my account because they said that a certain query to my database was creating 1GB of error logs every 15 seconds. I am not sure why this is happening.
I wanted to know if anyone has encountered and successfully solved this issue. We were working on this site on a dev server with no problems, but now since we've moved to our production environment we've been getting this issue. I am thinking that maybe some files were lost in the transfer, however it does not seem so.
Thanks
OK So I have found a solution for this, and I figure that it would help to let everyone on here know as well.
Basically, after a lot of research, I have found that the MailChimp Archives plugin apparently fires off the naughty cron job in question every time someone visits the site. For whatever reason, it got thrown into an infinite loop which was creating huge log files (64MB in about 3 seconds). Once I discovered exactly where the issue was coming from, I did the following:
Disabled the plugin
Found a Wordpress function that removes selected hook that schedules the runaway cron job (http://codex.wordpress.org/Function_Reference/wp_clear_scheduled_hook).
Used that function to remove the hook in question, by inserting it into my theme's functions.php file, and reloading the page.
Removed the function once I reloaded the page a few times.
Found the corresponding data in the database, which was in the wp_options table. I just searched the name of that same hook that caused the problem, and found that the option value field contained 9.5MB of text in it! Obviously the cause of the massive slowdown, since this 9.5MB of text needed to be loaded and parsed every time someone visited the page. I removed this completely from the database.
Once this was done, I started to notice incremental increases in performance on my Wordpress site over about a half hour or so. I also did another test to see if the log files were accumulating, and they were now only fluctuating between 3-4Kb, which was way better.
I hope this helps. Even though this seems to be a fairly common problem, I don't see many detailed solutions for it, so let this be the first.
Thanks
I believe there was an issue where if the server would go into an infinite loop if you didn't have the wp_cron.php file, since returning the error calls the file again. It's worth checking for in this case.
It's also possible that a variant might be happening - you try to access a file from wp-cron, and the file isn't found.
Even if all the files were copied, their paths might not have been copied correctly.
The cron jobs of Wordpress were causing a high CPU consumption on the server. Even defining define ('DISABLE_WP_CRON', 'true'); does not work. Without using a plugin the way I found it was to include this in the theme's functions.php:
global $wpdb;
$wpdb->update("wp_options", array("option_value"=>""), array("option_name"=>"cron"));

Categories