• I try to fix a issue on an older wordpress instance with your plugin which shows a lot of 404 errors on the console when the plugin tries to load it’s javascript and css assets and causes the page to load really slow.

    I already checked if the files are there and have the right permissions, however the Webserver doesn’t allow thw files to be public for some reason.

    What can I do to fix this?

    GET https://hkv-koefering.de/bitnami/wordpress/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/static/slideshow/ngg_basic_slideshow.js?ver=3.37 net::ERR_ABORTED 404 (Not Found)
    hkv-koefering.de/:35     GET https://hkv-koefering.de/bitnami/wordpress/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/static/slideshow/slick/slick-1.8.0-modded.js?ver=3.37 net::ERR_ABORTED 404 (Not Found)
    9 Refused to execute script from '<URL>' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
    hkv-koefering.de/:43     GET https://hkv-koefering.de/bitnami/wordpress/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/static/fontawesome/js/v4-shims.min.js?ver=5.3.1 net::ERR_ABORTED 404 (Not Found)
    hkv-koefering.de/:41     GET https://hkv-koefering.de/bitnami/wordpress/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ajax/static/ajax.min.js?ver=3.37 net::ERR_ABORTED 404 (Not Found)
    caldavlist.js?ver=1695512755:2 Uncaught SyntaxError: Unexpected token ')' (at caldavlist.js?ver=1695512755:2:593278)
    hkv-koefering.de/:44     GET https://hkv-koefering.de/bitnami/wordpress/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/static/fontawesome/js/all.min.js?ver=5.3.1 net::ERR_ABORTED 404 (Not Found)
    hkv-koefering.de/:422     GET https://hkv-koefering.de/bitnami/wordpress/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/lightbox/static/shutter/shutter.js?ver=3.37 net::ERR_ABORTED 404 (Not Found)
    hkv-koefering.de/:403     GET https://hkv-koefering.de/bitnami/wordpress/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/static/common.js?ver=3.37 net::ERR_ABORTED 404 (Not Found)
    hkv-koefering.de/:421     GET https://hkv-koefering.de/bitnami/wordpress/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/lightbox/static/lightbox_context.js?ver=3.37 net::ERR_ABORTED 404 (Not Found)
    hkv-koefering.de/:423     GET https://hkv-koefering.de/bitnami/wordpress/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/lightbox/static/shutter/nextgen_shutter.js?ver=3.37 net::ERR_ABORTED 404 (Not Found)
    • This topic was modified 1 year, 2 months ago by kimdre.

    The page I need help with: [log in to see the link]

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

    (@kimdre)

    I already tried to reinstall the plugin and cleared any cache.

    The settings in the admin panel also don’t seem to show up/work.

    Thread Starter kimdre

    (@kimdre)

    Ok i was able to fix the issues by doing the following:

    • The plugin tried to load all assets from the absolute path of the webserver for some reason:
      /bitnami/wordpress/wp-content instead of /wp-content
      • I was able to fix this by rewriting the path with a .htaccess rule:
        RedirectMatch 301 ^/bitnami/wordpress/wp-content/(.*) /wp-content/$1
    • The plugins tries to load asses from an insecure http connection and thefore gets blocked because of Mixed Content errors
      • I was able to fix this by also adding a .htaccess rule:
        Header always set Content-Security-Policy: upgrade-insecure-requests

    Please let the devs of this plugin look into these issues, as this is not how to load assets and violates security best-practices and your plugin is the only one I have installed with this behaviour.

    • This reply was modified 1 year, 2 months ago by kimdre.
    Plugin Contributor Imagely

    (@imagely)

    Hi @kimdre,

    Our dev team is aware of these problems occurring on Bitnami, and we look forward to seeing how the path retrieving method can be rethought, so it’d properly work regardless of the server’s folder structure.

    As a possible workaround, you can either use the redirect (as you already did) or try to add this constant to your?wp-config.php to specify the plugins’ folder path (changing yoursitedomainhere.de to your actual domain):

    define('WP_PLUGIN_DIR', 'https://yoursitedomainhere.de/wp-content/plugins/');
    Plugin Contributor Imagely

    (@imagely)

    Hi @kimdre,

    If the before mentioned constant doesn’t help, our developers suggested that you can use this one instead:

    define('NGG_GALLERY_ROOT_TYPE', 'content');
    Thread Starter kimdre

    (@kimdre)

    Unfortunately, neither option worked for me. ??

    I also tried your code with the new version 3.41 but got the following error:

    RuntimeException thrown
    /bitnami/wordpress/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_album/templates/extended/default-view.php is not a valid MVC template
    Plugin Contributor Imagely

    (@imagely)

    Hi @kimdre,

    We are sorry to hear of the new issue. Our developers are already investigating the problem happening on Bitnami as we got a few other reports of it.

    We’ll keep you updated in case of any news. In the meantime, we recommend rolling back to NGG 3.39

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘404 Errors on asset load’ is closed to new replies.