WordPress.org

Ready to get started?Download WordPress

Forums

Autoptimize
[resolved] First page destroyed (v. 1.5) (14 posts)

  1. blog-it-solutions
    Member
    Posted 1 year ago #

    Hi,

    today I updated Autoptimize to Version 1.5 and that was not a good choice. After clearing the cache the first page (home page) of http://www.blog-it-solutions.de was destroyed: There was no style sheet loaded.

    Then I tried to install the current developer version but there was still no success. Now I moved back to Version 1.4 and it still works.

    I do not know exactly what the problem is. But this could be help you:

    Version 1.5: Cached styles and scripts: 4
    Version 1.4: Cached styles and scripts: 3

    Regards,
    Josef

    http://wordpress.org/extend/plugins/autoptimize/

  2. futtta
    Member
    Plugin Author

    Posted 1 year ago #

    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

  3. blog-it-solutions
    Member
    Posted 1 year ago #

    Hi Frank,

    that works. Thanks! Now I can use version 1.5.

    Regards,
    Josef

  4. blog-it-solutions
    Member
    Posted 1 year ago #

    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

  5. futtta
    Member
    Plugin Author

    Posted 1 year ago #

    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?

  6. blog-it-solutions
    Member
    Posted 1 year ago #

    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.

  7. futtta
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  8. blog-it-solutions
    Member
    Posted 1 year ago #

    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.

  9. futtta
    Member
    Plugin Author

    Posted 1 year ago #

    no mail in my mailbox so far. can you check email-address, should be

    futtta at gmail dot com

  10. blog-it-solutions
    Member
    Posted 1 year ago #

    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.

  11. futtta
    Member
    Plugin Author

    Posted 1 year ago #

    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

  12. blog-it-solutions
    Member
    Posted 1 year ago #

    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

  13. futtta
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  14. blog-it-solutions
    Member
    Posted 1 year ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.