5

I'm developing a wordpress plugin locally using:

  • MAMP (updated to PHP 5.4.4)
  • PhpStorm
  • Chrome

I've turned off short tag, magic quotes and zlib compression, but occasionally load-scripts.php comes back all gibberish:

Broken page

The admin area has no styling, and none of the scripts on the page load or work.

Occasionally, though they do work with a few hard refreshes ( shift + cmd + r )

I've seen a few similar examples and tried their fixes, to no avail (hence disabling short tags, magic quotes and zlib compression).

I've tried it in Firefox, and it breaks ... but when I hard-refresh the page a few times, the issue goes away.

I cannot replicate the issue in Safari.

6
  • 1
    This is almost certainly nothing to do with WordPress - sounds like an issue with Firefox (as Safari works fine) - this should probably go to ServerFault or SuperUser Commented Jul 16, 2012 at 17:36
  • thanks anu, for the heads up. thanks for the migration and edits, stack mods. i was speaking w/ another dev, and they've had similar issues with chrome before in a local environment, something about the headers not getting there / being sent before file is interpreted. which makes sense, load-scripts.php is supposed to be interpreted as js, but if arrived with something wrong in the header it could fail. i'm not marking this as the answer. just a thought. Commented Jul 16, 2012 at 19:50
  • Same is happening here. Strange thing is that this was working fine a few days ago. will post a solution if i find Commented Aug 7, 2012 at 19:45
  • Well this is really strange. I opened the local site with a "incognito window" of Chrome and the problem dissapeared :S Commented Aug 7, 2012 at 19:47
  • that is weird. good to know though, thanks for posting! Commented Aug 8, 2012 at 16:17

7 Answers 7

12

I had the same issue. Deleting my cookies from that domain and clearing my cache fixed it.

Sign up to request clarification or add additional context in comments.

3 Comments

this is the only thing i could figure it was, probably an issue between some cacheing, old cookies, and chrome updating. ty to everyone for posting tho. a head scratcher for sure.
After updating Wordpress on my local webserver, I had the same issue, Cleared cache and eveything is fine, thanks :)
@Justin God bless you!
12

The issue, as hakre points out, is almost certainly the cache setting in MAMP. You need to disable it by going to MAMP > Preferences > PHP and set Cache to '--'. Restart MAMP, clear your browse cache and cookies and reload the page.

4 Comments

my cache settings in MAMP are / were disabled.
This was the solution for me.
Thanks, I had the same issue and couldn't figure out how to clear the cache!
For those who don't love the idea of clearing cache, if you're using Chrome just do as @robdodson says here, and then use an incognito window to do your development.
1

Please clean your browsers cache and delete all cookies. Also disable any caching on your localhost webserver installation.

From what you describe, I'd assume this is apache webserver caching and it does this because you once had compression enabled, something PHP might have done transparently before you configured it not to.

Look into your webservers manual and deactivate any caching. Any. That is important for debugging the issue.

Also disable anything that might set headers to tell the browser that it's okay to cache something in the browser cache. See your webservers' manual and disable anything such.

If the webserver had already cached those responses, you can reload how much you want, you will always see that but not in case repetitive reloading de-actives caching for the one or other request.

1 Comment

i have MAMP set not to cache anything, sry it took me so long to respond. i dumped all my cookies and setup chrome not to cache anything and the problem hasn't happened since. Some local area devs thought it may be an issue w/ a chrome update and my chrome settings.
0

Re-uploading the entire wp-includes directory fixed the problem for me.

Comments

0

Simply restarted my Mamp web server and it fixed the issue.

I also emptied my browser cache and deleted cookies but that didn't help.

Comments

0

In my case, the error was showing up when I was trying to save a DOMDocument (file) in a folder that wasn't there. I was trying to do something like this:

$xml->save("TEMP/test.xml");

But the folder TEMP wasn't there thus the error was pomping up.

Saving the file to the current directory (e.g. $xml->save("test.xml"); fixed the issue.

Comments

0

While you have those dev tools open, if you click and hold the refresh button, some extra options should appear. None of the other solutions here worked for me, but the Empty Cache and Hard Reload option in that drop-down cleared it up.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.