• Resolved jmanuelluis

    (@jmanuelluis)


    Hello,

    I’m having trouble to make no unsafe-inline plugin to work. When I enable tag capturing and click save, nothing happens (it doestn’t start to capture scripts). Also I have noticed that enabling the plugin does not create any tables in the database, I don’t know if this is normal.

    I’ve tried to enable debug but doesn’t show anything related to no unsafe-inline plugin. I’m only getting notices due to function calls not synced properly. I’ve tried removing all the plugins that make this notice show up and still not working. Also checked with another theme.

    I’ve just dockerized my wordpress application and updated wordpress to the latest version, here is the system info:

    Begin System Info (Generated 2025-09-12 11:13:08)

    ------------ SITE INFO
    Site URL: https://removed
    Home URL: https://removed
    Multisite: No

    ------------ USER BROWSER
    Platform: Windows
    Browser Name: Chrome
    Browser Version: 140.0.0.0

    ------------ WORDPRESS CONFIG
    WP Version: 6.8.2
    Language: es_ES
    Permalink Structure: /index.php/%year%/%monthnum%/%day%/%postname%/
    Active Theme: Hueman Child 1.0
    Parent Theme: Hueman 3.7.27
    Show On Front: posts
    ABSPATH: /var/www/html/
    WP_DEBUG: Enabled
    WP Memory Limit: 256MB

    ------------ NIMBLE CONFIGURATION
    Version: 3.3.8
    Upgraded From: 3.3.7
    Started With: 3.3.2

    ------------ MU PLUGINS
    no-unsafe-inline-output-buffering.php:

    ------------ WP ACTIVE PLUGINS
    Blank Slate: 1.2.1
    Newsletter: 8.9.4
    Nimble Page Builder: 3.3.8
    No unsafe-inline: 1.2.3
    PDF Embedder: 4.9.2
    Post Type Switcher: 4.0.0
    UpdraftPlus - Backup/Restore: 1.25.7
    WPForms Lite: 1.9.7.3
    WP Mail SMTP: 4.6.0
    Yoast SEO: 25.9

    ------------ WP INACTIVE PLUGINS
    Cookie Notice & Compliance for GDPR / CCPA: 2.5.7
    Query Monitor: 3.20.0

    ------------ WEBSERVER CONFIG
    PHP Version: 8.4.12
    MySQL Version: 10.3.39
    Webserver Info: Apache/2.4.65 (Debian)
    Write/Read permissions: OK

    ------------ PHP CONFIG
    Memory Limit: 256M
    Upload Max Size: 2M
    Post Max Size: 8M
    Upload Max Filesize: 2M
    Time Limit: 30
    Max Input Vars: 1000
    Display Errors: N/A
    PHP Arg Separator: &
    PHP Allow URL File Open: 1 End System Info

    Any help it’s welcome

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Giuseppe

    (@mociofiletto)

    Please share the site URL

    Thread Starter jmanuelluis

    (@jmanuelluis)

    Here it is, its a small web still in development

    https://preempresaysalud.amat.es/

    Plugin Author Giuseppe

    (@mociofiletto)

    Into includes/class-no-unsafe-inline-activator.php you can see the tables that should be created upon activation.

    In your site, the mu-plugin is in place and the plugin seems active with capture enabled because the rest route is active: https://preempresaysalud.amat.es/wp-json/no-unsafe-inline/v1/

    Can you enable WP_DEBUG and/or WP_DEBUG_LOG, then deactivate and reactivate the plugin and post here any message showed in console or registered in log?

    Thread Starter jmanuelluis

    (@jmanuelluis)

    Okay my bad, the tables are created, I was checking the wrong database (WORDPRESS_DB_NAME in docker is getting ignored, I dont’t know why, I found it checking wp-config.php )

    So the problem is that the plugin is not capturing the scripts. I’m getting a clear log after enabling WP_DEBUG and WP_DEBUG_LOG, just a notice regarding my theme that goes away if I install another theme. Still no script capture with different theme.

    I’ve tried to manually add a row to the table wp_nunil_inline_scripts and shows in the plugin, but no scripts are getting caught when fiddling around my web.

    • This reply was modified 7 months, 3 weeks ago by jmanuelluis.
    Thread Starter jmanuelluis

    (@jmanuelluis)

    Still needing help, anyone?

    Thanks

    jake

    (@jakegrabowski)

    I can confirm this behavior. I deployed wordpress 6.8.2 on docker locally on my machine. Image wordpress:latest. “Enable tag capture” seems to do nothing.

    Is this plugin requires some php extensions to be enabled?

    • This reply was modified 7 months, 3 weeks ago by jake.
    Thread Starter jmanuelluis

    (@jmanuelluis)

    I use php 8.4 and I think it requires no extensions. On previous version I was using it required 2 extensions but I cannot remember right now

    Thread Starter jmanuelluis

    (@jmanuelluis)

    Hello,

    SOLVED: I managed to make the plugin work. Downgrading the plugin no unsafe-inline to version 1.2.0 worked.

    Plugin Author Giuseppe

    (@mociofiletto)

    Hi @jmanuelluis @jakegrabowski , I think the issue is related to the libxml version that php is using.

    I have opened a bug for this on the project of the library used to parse HTML5 https://github.com/ivopetkov/html5-dom-document-php/issues/63

    In the meanwhile, I have introduced a workaround to not use html5-dom-document if PHP version is 8.4 or if libxml version is > 2.13.9.

    The patched version of No unsafe-inline is now in the development version available in SVN: https://downloads.wp.xz.cn/plugin/no-unsafe-inline.zip and will be released with next version 1.2.4.

    I would be glad if you could test the development version in your environment and write here if the bug is fixed.

Viewing 9 replies - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.