• I am getting the css generated from this plugin in the home page that is a page without blocs full of a lot of css generated by the plugin and wrong injections of the toc.
    The plugin should be executed in the pages where it is used.

Viewing 6 replies - 1 through 6 (of 6 total)
  • So seems that is required a patch to fix the issue.

    On class-uagb-front-assets.php line 116:

    		if ( is_archive() || is_home() || is_search() ) {
    
    			global $wp_query;
    			$cached_wp_query = $wp_query->posts;
    
    			foreach ( $cached_wp_query as $post ) { // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
    
    				$current_post_assets = new UAGB_Post_Assets( $post->ID );
    
    // 				$current_post_assets->enqueue_scripts();
    
    			}
    		}

    Commenting that line prevent this plugin to inject in home, archive and search the JS/CSS of all the blocks used of the plugin. I got like over 400 different enqueue in those pages for blocks that are in other pages.
    There isn’t any check here if those pages have blocks…

    Hello @mte90 ,

    Could you please confirm if you have figured it out?

    Looking forward to hearing from you.

    Regards,
    Sweta

    No I didn’t invested more time on this as it was enough this bugfix.

    Hello @mte90 ,

    Would you mind opening a ticket with us from here so that we can help you out?

    Looking forward to hearing from you.

    Regards,
    Sweta

    Hello @mte90 ,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Thank you!

    Well if a bugfix wasn’t deployed we will keep my modified version or remove it…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Enqueue assets from blocks in home/archive from other pages’ is closed to new replies.