This looks very much like the problem in this thread. Could you open up /wp-content/plugins/autoptimize/classes/autoptimizeStyles.php and on line 323 replace
$this->content = str_replace('</title>','</title><link type="text/css" media="'.$media.'" href="'.$url.'" rel="stylesheet" />',$this->content);
with:
$this->content = str_replace('<title>','<link type="text/css" media="'.$media.'" href="'.$url.'" rel="stylesheet" /><title>',$this->content);
Hope this helps,
frank
Hi Frank,
that works. Thanks! Now I can use version 1.5.
Regards,
Josef
There is still one point left: The issue still exists if I go in preview mode of an entry. How can I fix this?
Regards,
Josef
In preview mode no optimizations are done (as you’re logged in), so you should see your site as if there was no Autoptimize. Can you check the HTML source of the preview-page?
Ok, I see the problem. If I am not logged in the page is displayed correctly. But If I am logged in, then the page is destroyed. The first page (home page) and also all other pages. With version 1.4 I had no problems. I haven’t changed anything else.
weird, as the code isn’t activated when logged in (1.4 was, but issues with admin-bar in 3.5 complicated stuff) … Can you remove all caching (wordpress w3tc/ super cache, autoptimize cache, browser cache and maybe some proxy cache as well?) and try again?
if you still encounter the problem; could you create me a non-priveledged user (author or editor) for me to log in with, so I can look at a preview (tonight or tomorrow)? you can send login data to futtta-at-gmail-dot-com.
Now I have disabled all caching tools and features and the problem still exists. I have forwarded you the non-priveledged user account data to your e-mail address.
no mail in my mailbox so far. can you check email-address, should be
futtta at gmail dot com
Mh, that’s weird. I have sent the e-mail 2 hours ago. I sent the e-mail again. Please ping me if you will not receive my e-mail in the next couple of minutes.
No problem, got the mail now and logged in to see the problem in all its ugliness 😉
Now, based on the facts that:
- the HTML of the preview isn’t compressed
- there’s no mentioning of autoptimize in the HTML at all (for js or css-files)
It looks like the problem is not with Autoptimize, as it -as it was intended- isn’t active.
Moreover, when looking at Firebug Network output, I see there’s a CSS-file that fails to load (http://www.blog-it-solutions.de/wp-content/themes/iblog/css/theme.css) with a HTTP 403 error (“Forbidden”). I think something (a .htaccess maybe) is telling Apache not to serve that file?
Hope this helps,
frank
Hi Frank,
thank you very much for your help. You are so right! There was a problem with the file permissions. The theme.css file had no read permissions for “group” and “other”.
Now the problem is totally solved 🙂
Thanks,
Josef
Glad to help!
I just pushed out 1.5.1 which has the CSS order bug fixed, would be happy if you could test & confirm the problem solved.
Hi,
I have tested the 1.5.1 version and can tell you that the plugin works fine again and the problems seems to be solved. Thanks!