• When trying to upload a woff/2 font, I’m getting an error message:

    “Error: DISALLOW_FILE_EDIT cannot be enabled in wp-config.php to make modifications to the theme using this plugin.”Error: DISALLOW_FILE_EDIT cannot be enabled in wp-config.php to make modifications to the theme using this plugin.”

    From this message, it’s not clear to me whether define(‘DISALLOW_FILE_EDIT’, x); should be true or false, but I’ve tried both options and none of them work (in the begining, this setting wasn’t event here).

    using WP 6.2; twenty twenty three – child made with this plugin. More or less a fresh install

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Matias Benedetto

    (@mmaattiiaass)

    Hi @andrej_uduc, you need to remove the DISALLOW_FILE_EDIT definition or set it as false.

    The plugin checks specifically for that setting to be defined and true to throw the error.

    I’ve tried both options and none of them work (in the begining, this setting wasn’t event here).

    This is interesting, could you double-check this, please?

    Thread Starter andrej_uduc

    (@andrej_uduc)

    Well, I checked again. And the results are … mixed.

    The reason neither true nor false worked for me was, I somehow used wrong sign for the string :blush:

    define( ‘DISALLOW_FILE_EDIT’ , false ); <-works
    vs.
    define( ‘DISALLOW_FILE_EDIT’ , false ); <- doesn’t work

    On the other hand, just removing the line didn’t work for me.
    I traced it back to ‘Really Simple SSL’ plugin. It seems in the process of ‘hardening’ security it sets it to true (somewhere outside of wp_config file). So with nothing in the wp_config, it gets true by default.
    Since that is one of more popular plugins, a compatibility notice is in order.

    Plugin Author Matias Benedetto

    (@mmaattiiaass)

    Ok, just for future readers, the setting should be like this in wp-config.php:

    define( 'DISALLOW_FILE_EDIT', false );

    —-

    I traced it back to ‘Really Simple SSL’ plugin. It seems in the process of ‘hardening’ security it sets it to true (somewhere outside of wp_config file). So with nothing in the wp_config, it gets true by default.

    I’m glad to hear you found the root of the problem.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cannot upload local fonts – DISALLOW_FILE_EDIT’ is closed to new replies.