Recommend to a friend
Relative wordpress include not working if wp-content has been moved (2 posts)

  1. benjamin.anakena
    Posted 1 year ago #

    I've found an issue in the file "inc/raf_form.php".

    The wordpress environment loading in line 3 ("require_once( dirname(__FILE__) . '../../../../../wp-load.php' );") is not working if the "wp-content" directory has been moved to a different location.

    For example in my configuration my structure is:
    -> wp
    -> wp/wp-admin
    -> wp/wp-includes
    -> wp-content

    So as wp-content is not placed in the wp folder your relative path is broken. I manually changed it in the file but could you get it fixed in next release?

    Thank you


  2. benjaminniess
    Plugin Author

    Posted 11 months ago #


    The problem is that the raf_form.php page is not a classic WP file with the WP environment. I can't use the WP constants from here until I have manually loaded the wp-load.php file. I don't see others easy solution to load this file depending on the wp-content dir.

    I did it a long time ago and it was not the best solution. Maybe one day I'll find the time to refactor everything but it's not for now to be honest.

    I think that moving the wp-content folder is not a good thing because you may have many others problem with many others themes and plugins.

    Sorry for my being lait.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Recommend to a friend
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.