• Hi
    I´m using GB 1.4.0 with GP theme 3.1.0, GPP 2.1.1 and autoptimze 2.9.4-beta
    Changed in Admin->Generateblocks->Settigs from inline to external file, clicked “regenerate css files” but nothing happens, no uploads/generateblocks dir is created, no files, and the css get inlined allways.
    The uploads dir have drwxr-xr-x permissions and is owned by the user that runs the web server (nginx:nginx)
    Created manually the generateblocks dir and gave a+w to test, but no css files are created, I have updated post and hero elements to try, but no chance.
    How I can debug the issue?
    In Customizer I can select General-> Regenerate Css file and the file is re-created at uploads/generatepress dir.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter lofesa

    (@lofesa)

    Test I have made:
    1.- In the file class-enqueue-css.php Put an echo "<pre>".$mode."</pre>"; in mode() funct. and it returns allways “inline” becasue it fails in $mode = ( $this->can_write() && $this->make_css() ) ? 'file' : 'inline';
    So I go to test can_write()
    2.- Put an echo "<pre>".$page_id".</pre>"; in can_write() and it returns 0 in the front page (page for post), but returns nothing in a post.
    3.- In page_id() put an echo "<pre>".$id".</pre>" and it returns 0 in front page and the postid in a post.

    • This reply was modified 3 years, 7 months ago by lofesa.
    Plugin Author Tom

    (@edge22)

    Hi there,

    If your front page is set to display your latest posts it means it won’t have a page ID, which is why it can’t generate an external file.

    This will fallback to inline, which shouldn’t be an issue at all.

    Let us know if you have any other questions 🙂

    Thread Starter lofesa

    (@lofesa)

    Well… But in post?
    In all post we have a generateblocks element buttons for post navigation and have css from generateblocks but still no create the files.
    Only works when front page is a static one?

    • This reply was modified 3 years, 7 months ago by lofesa.
    Plugin Author Tom

    (@edge22)

    I’m not too sure what you mean – is this for when you’re viewing single posts?

    If so, a file will only be created if the CSS is larger than 500 characters.

    Or is this for the posts front page, still?

    If you’re able to link us to the problem page it will help us understand what’s happening.

    Thanks!

    Thread Starter lofesa

    (@lofesa)

    Well…
    I mean that in all post we have generateblocks elements, in generateblocks config have set to store it in files but get allways inlined. The length in chars of the inlined css is 5.068 characters.
    I have put all these echo commands I have related in the 2nd. message and when a post is updated the variable $post_ID in the function can_write() is blank so it fail and fallback to inline the css.
    You can see it in https://intersindicalrm.org/teniamos-razon-habia-un-camino-mejor-y-sigue-habiendolo/
    If you need credentials to login I can open a ticket in generatepress forum and put it in private area.

    Plugin Author Tom

    (@edge22)

    Login details aren’t necessary, but since this is related to our GP Premium plugin the premium GeneratePress support forum would be preferred.

    If you can create a new topic in there and be sure to include the URL and possibly a screenshot of the area we should be looking for it would be very helpful.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can´t generate css files’ is closed to new replies.