-
AuthorPosts
-
May 10, 2023 at 5:06 pm #1407017
Hi
We have a relatively large website with 175 posts and 125 pages, translated into 4 languages. Now we have noticed that for some posts (possibly also pages) the corresponding dynamic css file (e.g. post-35942.css in the folder /dynamic_avia/avia_posts_css/) is missing. This always affects all languages of the post, despite different post ids. As soon as we save the corresponding post again (without making any changes), the missing CSS file is created.
Unfortunately, we are currently in the dark as to possible causes. Can you explain the behavior or give us tips on how we can best track down the cause?
Is there a way to regenerate all dynamic CSS files in one go?We are using WordPress 6.1.1 with Enfold 5.4.1 and WPML 4.6.3.
Many thanks in advance
May 11, 2023 at 5:56 am #1407070Hey Jeannette,
Thank you for the inquiry.
The posts without the dynamic css files might have been created before the dynamic css feature was released. In order to update the posts again in bulk, you can use the quick editor or a bulk editing plugin.
Here are some options:
– You can use the built-in quick editor in the Posts screen. Select the posts that need to be updated, then click on “Quick Edit”. Add a space or a character in the “Tags” field, then click “Update”. This will trigger the dynamic css file generation for the selected posts.
– Alternatively, you can use a bulk editing plugin to update the posts in bulk. Here are some popular ones:
Bulk Editor: https://wordpress.org/plugins/bulk-editor/
Custom Bulk/Quick Edit: https://wordpress.org/plugins/custom-bulkquick-edit/
WP Bulk Edit Post Types: https://wordpress.org/plugins/wpbulky-wp-bulk-edit-post-types/Best regards,
IsmaelMay 11, 2023 at 10:10 am #1407087Hello Ismael
Thank you very much for your explanations.
The affected posts (9 pieces of 4 languages each) were created between 24.02. and 28.04. of this year. A large part of the posts were entered before 24.02., but are not affected by the problem. Interestingly, we updated from Enfold 5.2.1 to 5.4.1 on March 2. So the problem occurred for some time before and after the update, but suddenly stopped since the beginning of May – even though we haven’t made any obvious changes to the system.
Are there any specific requirements that need to be met in order for the creation of the dynamic CSS to work?
Many thanks.
May 12, 2023 at 4:26 am #1407165Hi,
Thank you for the update.
According to @Guenter, it is possible that there are no custom styling necessary for the posts (colors, margin, fonts etc), so generating the dynamic stylesheets are not required. Do you see any styling issues on the posts?
Best regards,
IsmaelMay 12, 2023 at 3:14 pm #1407248Hi Ismael
Thank you very much.
No, we could not find any layout issues. The problem is much more that the CSS file is included by the template via link tag, which results in a 404 error if it is not present. I also compared the generated CSS of a post where the generation worked on the first try to a CSS of a post where a re-save was required. Except for the different IDs of the affected elements, the content is the same:
.flex_column.av-jo2xz-588590f8e0c3dd5b36ff4df9077018fa{ -webkit-border-radius:0px 0px 0px 0px; -moz-border-radius:0px 0px 0px 0px; border-radius:0px 0px 0px 0px; padding:0px 0px 0px 0px; } .flex_column.av-e2kbb-86d4495b00c389f290046e9e5f6e0589{ -webkit-border-radius:0px 0px 0px 0px; -moz-border-radius:0px 0px 0px 0px; border-radius:0px 0px 0px 0px; padding:0px 0px 0px 0px; }
Kind regards
May 15, 2023 at 3:12 am #1407402Hi,
Have you tried using any of the bulk editing plugins that we recommended above? The plugins should help regenerate the dynamic stylesheets without editing the posts manually. And if necessary, you can also disable the post css files by adding this filter in the functions.php file.
/** * Filter to skip css file generation. * You can add logic to skip for certain pages/posts only. * * @since 4.8.6.1 * @param boolean $create * @return boolean true | false or anything else to skip generation of css file */ function custom_avf_post_css_create_file( $create ) { return false; } add_filter( 'avf_post_css_create_file', 'custom_avf_post_css_create_file', 10, 1 );
Best regards,
IsmaelMay 15, 2023 at 11:43 am #1407434Hi Ismael
No, I have not yet regenerated the missing CSS files because I first wanted to find out more about the cause and not to cover any valuable traces.
Thanks for the tip about disabling post css files. If I disable those altogether, what happens to any post-specific element settings (such as a custom margin for columns)? Is this then not applied or e.g. implemented using inline CSS?
Kind regards
May 23, 2023 at 5:24 am #1408220Hi,
? Is this then not applied or e.g. implemented using inline CSS?
Yes, that is correct. The custom styles for the elements will be applied using inline CSS. However, we are currently unsure why the dynamic stylesheets are not being generated for some of your posts.
Best regards,
IsmaelMay 23, 2023 at 4:58 pm #1408302Hi Ismael
So I know, thank you very much.
Why the problem occurred in the first place is still a mystery to me. With the last posts it worked perfectly.Many thanks
May 25, 2023 at 5:19 pm #1408561Hi,
Glad Ismael could help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘Dynamic post css missing’ is closed to new replies.