Support » Plugin: Recommend to a friend » Relative wordpress include not working if wp-content has been moved

  • Hi,
    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

Viewing 1 replies (of 1 total)
  • Plugin Author benjaminniess



    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.

Viewing 1 replies (of 1 total)
  • The topic ‘Relative wordpress include not working if wp-content has been moved’ is closed to new replies.