Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author wpdevelop

    (@wpdevelop)

    Hello.
    Its known issue. We will fix it in next update.
    In the actual version, you are need to make this fix.
    Please open this file ../booking/wpdev-booking.php

    then find this code:

    if (!defined('WP_CONTENT_DIR'))      define('WP_CONTENT_DIR', ABSPATH . 'wp-content');
        if (!defined('WP_CONTENT_URL'))      define('WP_CONTENT_URL', $wpdev_bk_my_site_url . '/wp-content');
        if (!defined('WP_PLUGIN_DIR'))       define('WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins');
        if (!defined('WP_PLUGIN_URL'))       define('WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins');
        if (!defined('WPDEV_BK_PLUGIN_FILENAME'))  define('WPDEV_BK_PLUGIN_FILENAME',  basename( __FILE__ ) );
        if (!defined('WPDEV_BK_PLUGIN_DIRNAME'))   define('WPDEV_BK_PLUGIN_DIRNAME',  plugin_basename(dirname(__FILE__)) );
        if (!defined('WPDEV_BK_PLUGIN_DIR')) define('WPDEV_BK_PLUGIN_DIR', WP_PLUGIN_DIR.'/'.WPDEV_BK_PLUGIN_DIRNAME );
        if (!defined('WPDEV_BK_PLUGIN_URL')) define('WPDEV_BK_PLUGIN_URL', $wpdev_bk_my_site_url.'/wp-content/plugins/'.WPDEV_BK_PLUGIN_DIRNAME );

    and replace it to this code:

    if (!defined('WP_CONTENT_DIR'))            define('WP_CONTENT_DIR', ABSPATH . 'wp-content');                        // Z:\home\server.com\www/wp-content
        if (!defined('WP_PLUGIN_DIR'))             define('WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins');                    // Z:\home\server.com\www/wp-content/plugins
        if (!defined('WPDEV_BK_PLUGIN_FILENAME'))  define('WPDEV_BK_PLUGIN_FILENAME',  basename( __FILE__ ) );              // menu-compouser.php
        if (!defined('WPDEV_BK_PLUGIN_DIRNAME'))   define('WPDEV_BK_PLUGIN_DIRNAME',  plugin_basename(dirname(__FILE__)) ); // menu-compouser
        if (!defined('WPDEV_BK_PLUGIN_DIR'))       define('WPDEV_BK_PLUGIN_DIR', WP_PLUGIN_DIR.'/'.WPDEV_BK_PLUGIN_DIRNAME ); // Z:\home\server.com\www/wp-content/plugins/menu-compouser
        if (!defined('WP_CONTENT_URL'))      define('WP_CONTENT_URL', content_url() );                          // https://server.com/wp-content
        if (!defined('WP_PLUGIN_URL'))       define('WP_PLUGIN_URL',  plugins_url() );                          // https://server.com/wp-content/plugins
        if (!defined('WPDEV_BK_PLUGIN_URL')) define('WPDEV_BK_PLUGIN_URL', plugins_url( '', WPDEV_BK_FILE ) );  // https://server.com/wp-content/plugins/menu-compouser

    Also please open this file ../booking/lib/wpdev-booking-class.php

    then find this code:

    var wpdev_bk_plugin_url     = '<?php
                if (WP_BK_SSL) {   // Activate SSL
                    $bk_url_for_js = site_url( '/wp-content/plugins/'.WPDEV_BK_PLUGIN_DIRNAME, 'https' );
                    $my_parsed_url = parse_url($bk_url_for_js);
                    echo $my_parsed_url['scheme'] . '://'. $_SERVER['SERVER_NAME'] . $my_parsed_url['path'] ;
                } else {
                    echo site_url( '/wp-content/plugins/'.WPDEV_BK_PLUGIN_DIRNAME );
                }
                ?>';

    and replace it to this code:

    var wpdev_bk_plugin_url     = '<?php
                echo   plugins_url( '' , WPDEV_BK_FILE );
                ?>';
    Thread Starter simenschi

    (@simenschi)

    Great, thank you!

    Looking forward to the update!

    Thread Starter simenschi

    (@simenschi)

    Seems I’ve got another issue after I edited the file. Now I’m getting the 500 server error, and the file /app/plugins/booking/wpdev-booking.php says I can’t access it. Even though I’ve set the permissions to 777, 755 and 644. The file says “You do not have permission to direct access to this file !!!” no matter what.

    Is there anything else I can check besides the permissions?

    Plugin Author wpdevelop

    (@wpdevelop)

    Hello.
    1) This warning “”You do not have permission to direct access to this file !!!” is correct, it have to be so, if you try to open the direct URL to that file in browser.

    2) According 500 server error.
    Please recheck carefully, that you was made all changes correctly and do not make any mistakes.
    Please recheck the error.log file of your server, so you be sure in a reason of that issue and then we can fix it.
    Kind regards.

    Thread Starter simenschi

    (@simenschi)

    Thanks for the quick answer!

    1) Ah, I see.

    2) I reinstalled the plugin and did the changes to the files carefully to make sure I didn’t make any mistakes before. But I still get the same error. The error log(in chrome) says the following:

    POST https://test.bookingcalendar.dev/app/plugins/booking/wpdev-booking.php 500 (Internal Server Error)

    I checked the PHP-log, which says the following:
    [05-Feb-2014 10:24:34 UTC] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required '/Users/lain/Public/Testprosjekter/booking_calendar/app/plugins/booking/../../../wp-load.php' (include_path='.:/Applications/MAMP/bin/php/php5.3.14/lib/php') in /Users/lain/Public/Testprosjekter/booking_calendar/app/plugins/booking/wpdev-booking.php on line 183

    In other words, it’s trying to access the wp-load.php file thats in the root of the wordpress installation, but since I have mine in a sub folder the path is wrong. So I guess the line 183 in wpdev-booking.php
    require_once( dirname(__FILE__) . '/../../../wp-load.php' );
    should be a path containing the wordpress core-folder.
    Found some thoughts about that here. But I guess there should be a way to find the wordpress core path fom wordpress itself..?

    Anyway, I changed the path to my wordpress core folder(which was sub folder), and that did the trick.

    Plugin Author wpdevelop

    (@wpdevelop)

    Hello.
    Good to know that you fixed an issue.
    And thank you about your suggestion.
    I will add this fix to the next update.
    Kind regards.

    I also having the same issue. But I couldn’t find the code that you have stated in the file ../booking/wpdev-booking.php and ../booking/lib/wpdev-booking-class.php.

    Anyway have this issue being fix?

    Warmest regards.

    Plugin Author wpdevelop

    (@wpdevelop)

    Hello.
    If you are using latest version 5.1.6, so all files includes you can find at the ../booking/lib/wpdev-include.php file.

    But please, note, the latest 5.1.6 update have to support the custom wp-content folder.
    Did you sure that issue relative to the wrong folder ?
    Kind Regards.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Custom wp-content folder not supported?’ is closed to new replies.