Support » Plugin: Minimal Coming Soon & Maintenance Mode » Fatal Error Due to Hard Coded Directory Name

  • Resolved digitaltech

    (@digitaltech)



    Greetings,

    Your plugin looks nice. However, I got a fatal error right off the bat due to the content directory name being hard coded at line 11 of…

    /plugins/minimal-coming-soon-maintenance-mode/framework/admin/preview.php

    Instead, one of the built-in WP functions should be used. See…

    https://codex.wordpress.org/Determining_Plugin_and_Content_Directories

    I have renamed my content directory using the following in my wp-config.php…

    define( ‘WP_CONTENT_DIR’, ‘my-content-dir-name’ );

    This is sanctioned practice, so updating your code to use a built-in WP function to get the name should resolve the issue.

    -Steve

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WebFactory

    (@webfactory)

    Hi Steve,
    Don’t know how that got under the radar 🙁 Really sorry! We’ll get it fixed ASAP to use the appropriate WP function and fetch the dir.

    Thank you for letting us know!

    Plugin Author WebFactory

    (@webfactory)

    @digitaltech this is proving to be a bit more difficult than we thought. Since preview.php is called directly there are no WP ENV vars to rely on. So at the moment, the code stays as is because there is no proper quick fix. We have to rewrite how the whole preview works in order to fix it. Sorry 🙁

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.