Home Forums WoodMart support forum Duplicate xts-header css files

Duplicate xts-header css files

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #204463

    PartnersOnline
    Participant

    Hi,
    I have a couple of woodmart installations, and in all of them are a lot in the wp-content/uploads/x/ xts-header css files. In some cases there are more than 1000 the same files.
    I also use WP Rocket and in the cached html files, there are links to the xts-header files that don’t exist anymore. So in my HTML code is now a 404 error and the design (header) is broken. How can i avoid that there the xts-header file does not replicate anymore and the filename stays the same, so there won’t be a 404 in my HTML code.
    Hope to hear soon.

    Attachments:
    You must be logged in to view attached files.
    #204468

    Artem Temos
    Keymaster

    Hello,

    Could you please disable all plugins that are not related to our theme and provide us your admin and FTP access so we can check it?

    Thank you in advance

    #204476

    PartnersOnline
    Participant

    I already disabled the plugin one-by-one. Thats not the issue.
    I also do not need a solution for 1 WooCommerce webshop, but want it to fix in all my installations/webshops.
    So if you fix it, tell me how to fix it in the other webshops.

    #204486

    Artem Temos
    Keymaster

    We can’t access to your WordPress dashboard. Please, check the password.

    #204487

    PartnersOnline
    Participant

    Please try again.

    #204489

    Artem Temos
    Keymaster

    We don’t see any problem with that and there are no new files generated. When the new file is generated an old one is removed from the server.

    Here is a video example https://gyazo.com/04b21463ff7e440d2f14d156ec5195c8

    #204492

    PartnersOnline
    Participant

    Because this is not an active website, there are not a lot of generated files. I will send you FTP of another one that is active.

    Attachments:
    You must be logged in to view attached files.
    #204494

    PartnersOnline
    Participant

    You see that the name is changing in your video file. When you use cache, there will be a link to the old name in cached pages. For that reason i also set the css code of that generated file into wordpress custom css, to keep the design up-and-running.

    We don’t see any problem with that and there are no new files generated. When the new file is generated an old one is removed from the server.

    Here is a video example https://gyazo.com/04b21463ff7e440d2f14d156ec5195c8

    #204497

    Artem Temos
    Keymaster

    Could you please test how it works now? We have added a fix but can’t test it since we are not able to reproduce the problem. We have refreshed your website pages a lot of times but new CSS files were not generated.

    Note that you need to clear your cache each time you save any of your headers in the Header builder or our Theme settings.

    #204499

    PartnersOnline
    Participant

    At 11:44 there is a new file already, so it seems not to work yet.
    The previous was generated at 11:35

    #204503

    PartnersOnline
    Participant

    For now the file is still on 11:44, so far so good. I will monitor it the next hours.
    Can you share the changes? An will it also be in the next update, so the problem is not back again?

    A suggestion: now the xts-header css is in folder: wp-content/uploads/2020/06/ In the next month it will be 2020/07/ So then there will be 404’s again in the cached HTML content. So it seems better to place it outside the 2020/06/ folder and place it in the wp-content/uploads/. So two levvels up or a complete other location.

    #204525

    PartnersOnline
    Participant

    After 1 hour and 15 minutes the filename is still the same and has the same time.
    So it seems that your fix did work.

    #204530

    Artem Temos
    Keymaster

    Next month the file will be still loaded from the previous location while you don’t update the header with Header builder.

    #204531

    Artem Temos
    Keymaster

    We have chnaged three files

    1. woodmart\inc\builder\Frontend.php

    code

    $this->_storage->write( $styles->get_all_css( $this->header->get_structure(), $this->header->get_options() ) );

    replaced with

    $this->_storage->write( $styles->get_all_css( $this->header->get_structure(), $this->header->get_options() ), true );

    2. woodmart\inc\classes\Stylesstorage.php

    public function write( $css ) {

    with

    public function write( $css, $is_frontend = false ) {

    and

    $this->write_file( $css );

    with

    if ( ! $is_frontend ) {
    	$this->write_file( $css );
    }

    3. woodmart\inc\classes\Themesettingscss.php

    from

    $this->storage->write( $this->get_all_css() );

    to

    $this->storage->write( $this->get_all_css(), true );

    Kind Regards

    #204539

    PartnersOnline
    Participant

    Great!
    Thx for the support.

    PS: The file name and date is after two hours still the same!

    #204549

    Artem Temos
    Keymaster

    Great, you are welcome!
    We will fix this in our update. It will be released in a few weeks.

Viewing 16 posts - 1 through 16 (of 16 total)