ERROR after update to version: 2.2.3.

I just updated the the plugin to the latest version: 2.2.3. After doing that, I refreshed the front-end of a site I was working on, and received the following errors at the top of my page, before the rest loaded:

Warning: include_once(/home/fiddlers/public_html/wp-content/plugins/blogtemplates//blogtemplatesfiles/dash-notice/wpmudev-dash-notification.php) [function.include-once]: failed to open stream: No such file or directory in /home/fiddlers/public_html/wp-content/plugins/blogtemplates/blogtemplates.php on line 60

Warning: include_once() [function.include]: Failed opening '/home/fiddlers/public_html/wp-content/plugins/blogtemplates//blogtemplatesfiles/dash-notice/wpmudev-dash-notification.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/fiddlers/public_html/wp-content/plugins/blogtemplates/blogtemplates.php on line 60

Warning: Cannot modify header information - headers already sent by (output started at /home/fiddlers/public_html/wp-content/plugins/blogtemplates/blogtemplates.php:60) in /home/fiddlers/public_html/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 89

Then loading the plugins page of the network admin, the same kind of thing:

Warning: include_once(/home/fiddlers/public_html/wp-content/plugins/blogtemplates//blogtemplatesfiles/dash-notice/wpmudev-dash-notification.php) [function.include-once]: failed to open stream: No such file or directory in /home/fiddlers/public_html/wp-content/plugins/blogtemplates/blogtemplates.php on line 60

Warning: include_once() [function.include]: Failed opening '/home/fiddlers/public_html/wp-content/plugins/blogtemplates//blogtemplatesfiles/dash-notice/wpmudev-dash-notification.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/fiddlers/public_html/wp-content/plugins/blogtemplates/blogtemplates.php on line 60

So something definitely broke in the update. Is the the update? Or did something get corrupted.

Also, why is blog templates involved in loading the front-end of one of my sites? I can understand the plugin might need to load or run something on the front-end of the parent site, if/when people register a new blog and select from those options. However, it should never need to be loaded as part of loading the front-end of a sub-site (or even the back-end for that matter)! This increases load times, for something that's totally irrelevant on normal sub-sites that have already been created.

Please fix this right away.

  • Vinod Dalvi

    Hi @Tevya Washburn,

    Thanks for reporting the issue.

    I faced the same issue on updating the plugin to the latest version. I have notified this to the developer and it will be fixed ASAP.

    In the meanwhile you can just use previous version of this plugin from here https://premium.wpmudev.org/project/new-blog-template/ or in latest plugin version just open the plugin file blogtemplates\blogtemplates.php and comment / remove the below code on line number 60
    include_once( NBT_PLUGIN_DIR . '/blogtemplatesfiles/dash-notice/wpmudev-dash-notification.php' );

    Best Regards,

  • Tevya

    Thanks. I saw the other threads after posting this one.

    However, I would still like an answer on my previous question:

    why is blog templates involved in loading the front-end of one of my sites? I can understand the plugin might need to load or run something on the front-end of the parent site, if/when people register a new blog and select from those options. However, it should never need to be loaded as part of loading the front-end of a sub-site (or even the back-end for that matter)! This increases load times, for something that's totally irrelevant on normal sub-sites that have already been created.

    This is a real issue if the plugin is loading places it's completely not needed. No wonder my Multisite feels slow these days.....

  • Ignacio

    Hi @Tevya Washburn.

    New Blog Templates loads what is needed in every refresh and we improve its performance in every release loading less files if they are not needed but it does not goes through each subdomain. Have you tried deactivating it? The plugin loads some resources in the network admin and in signup page. It also checks some other things in several pages but it needs to do it in order to know what to load in every moment.

    Regards.
    Ignacio.

  • Tevya

    But it was loading on the front-end of a sub-site... that's where I was getting one of the 2 errors in my original post. Forgive me if I don't understand, but I can't think of any reason it should be loading on the front-end of a sub-site. Or even on the backend of a subsite that is not one of the template sites. Yet I got the error on the front-end of a site that was not a template.

    That's my concern: that it's loading on all subsites, even if just in the admin area, when it shouldn't be needed, should it?

  • Ignacio

    Not exactly, the plugin needs to do some little checks in every refresh. For instance, it needs to check if you've installed a new version of the plugin and if it needs some upgrades. Latest versions these upgrades have been things like add the templates categories table or adding some columns to the templates table. This need to be checked in every refresh and is a very tiny operation that should not affect your site speed (unless an upgrade is needed in that moment) so yes, the plugin need to be loaded every time. What we are trying to do is loading as less ressources as we can and this is the thing that is getting improve in each release.

    About the error, well, maybe you're right, I'm not sure if that file is needed in the front end as well as it's our dashboard notice file that is only viewed in the back end so we'll study about including it just in the admin area.

    Regards.
    Ignacio.

  • Tevya

    I thought that's what wp-cron.php and the core updater are for? To check for updates on a schedule, rather than on every load?

    Yeah, I understand that what is loaded is minimal, however, if you have 30 plugins that all load "very little" on a Multisite, suddenly all those very little's adds up to some significance. So if I have slowness, it's probably not just this one plugin, but I'll encourage the same with any other plugins that appear to be loading where/when not needed as well.

    Thanks for your response! I look forward to the next update(s) that will hopefully improve this even further.

  • Ignacio

    What you say makes sense, absolutely, but imagine that the new version needs to create a new table to work fine. The plugin cannot wait until the next wp-cron is executed because it needs that table in that moment.

    New Blog Templates uses an option to check the current version of the plugin. This option is not loaded in a separate query but is loaded when WordPress gets all the options needed on startup: siteurl, timezone, among many others. So in just one query, WordPress loads tons of options. If every plugin checks the version with this method, there won't be any speed issue at all. There's other improvements to do but this is not that case, NBT needs that option to be loaded with the rest.

    Regards.
    Ignacio.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.