New Landing How can we help? Themeforest Theme Support Dante Cannot open Swift Framework Shortcodes

Viewing 15 posts - 1 through 15 (of 37 total)
  • Posted in: Dante
  • #36658
    ielbury
    Member
    Post count: 51

    When I click on the Swift Framework Shortcodes icon in the page editor I was getting a 500 from the server. I enabled displaying of php errors and this is what I cam getting:

    Warning: require_once(C:\inetpub\wwwroot\dante\wp-content\themes\dante\swift-framework\sf-shortcodes\interface.php/wp-load.php): failed to open stream: No such file or directory in C:\inetpub\wwwroot\dante\wp-content\themes\dante\swift-framework\sf-shortcodes\config.php on line 12
    
    Fatal error: require_once(): Failed opening required 'C:\inetpub\wwwroot\dante\wp-content\themes\dante\swift-framework\sf-shortcodes\interface.php/wp-load.php' (include_path='.;C:\php\pear') in C:\inetpub\wwwroot\dante\wp-content\themes\dante\swift-framework\sf-shortcodes\config.php on line 12

    Not sure I am interested in debugging your code as I just purchased your template but the line of code is trying to require wp_load.php:

    require_once( sf_wp_path() . '/wp-load.php' );

    At this point your template is useless to me!

    Any help much appreciated,

    Ian

    #36792
    ielbury
    Member
    Post count: 51

    This works on Linux.
    Windows does not seem to be supported!

    #37016
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi there,

    If you edit /swift-framework/sf-shortcodes/config.php line 12 from:

    require_once( sf_wp_path() . '/wp-load.php' );

    to

    require_once( sf_wp_path() . '\wp-load.php' );

    Does that fix it? If so will have a think about a cross platform fix for this!

    Thanks,

    – Ed

    #43972
    Weekendfm
    Member
    Post count: 4

    Hello there,

    I have the same problem. I have changed this line in swift-framework/sf-shortcodes/config.php

    require_once( sf_wp_path() . ‘/wp-load.php’ );

    into this:

    require_once( sf_wp_path() . ‘\wp-load.php’ );

    and now there is a message:

    “Parse error: syntax error, unexpected ‘[‘ in /wp-content/themes/dante/swift-framework/sf-shortcodes/config.php on line 4”

    This is my config.php file in /swift-framework/sf-shortcodes/config.php line

    <?php
    if (!function_exists(‘sf_wp_path’)) {
    function sf_wp_path() {
    if (strstr( SF_SERVER[“SCRIPT_FILENAME”], “/wp-content/”)) {
    return preg_replace(“/\/wp-content\/.*/”, “”, SF_SERVER[“SCRIPT_FILENAME”]);
    } else {
    return preg_replace(“/\/[^\/]+?\/themes\/.*/”, “”, SF_SERVER[“SCRIPT_FILENAME”]);
    }
    }
    }

    sf_wp_path = sf_wp_path();

    if (strpos( sf_wp_path, ‘/’) !== false) {
    require_once( sf_wp_path() . ’/wp-load.php’ );
    } else {
    require_once( sf_wp_path() . ‘\wp-load.php’ );
    }
    ?>

    What is wrong? Can you help me?

    arek

    #43973
    Weekendfm
    Member
    Post count: 4

    ok, I changed line 17. and everything is ok πŸ™‚

    #43976
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Glad you sorted it!

    – Ed

    #44170
    junetwood
    Member
    Post count: 11

    Hi – I am having the same issue as the others

    Warning: require_once(D:\Hosting\5068133\html\wp-content\themes\dante\swift-framework\sf-shortcodes\interface.php/wp-load.php) [function.require-once]: failed to open stream: No such file or directory in D:\Hosting\5068133\html\wp-content\themes\dante\swift-framework\sf-shortcodes\config.php on line 17

    Fatal error: require_once() [function.require]: Failed opening required ‘D:\Hosting\5068133\html\wp-content\themes\dante\swift-framework\sf-shortcodes\interface.php/wp-load.php’ (include_path=’.;C:\php5\pear’) in D:\Hosting\5068133\html\wp-content\themes\dante\swift-framework\sf-shortcodes\config.php on line 17

    I’ve follow the directions and edited line 17 as you can see:

    <?php
    if (!function_exists(‘sf_wp_path’)) {
    function sf_wp_path() {
    if (strstr($_SERVER[“SCRIPT_FILENAME”], “/wp-content/”)) {
    return preg_replace(“/\/wp-content\/.*/”, “”, $_SERVER[“SCRIPT_FILENAME”]);
    } else {
    return preg_replace(“/\/[^\/]+?\/themes\/.*/”, “”, $_SERVER[“SCRIPT_FILENAME”]);
    }
    }
    }

    $wp_path = sf_wp_path();

    if (strpos($wp_path, ‘/’) !== false) {
    require_once( $wp_path . ‘/wp-load.php’ );
    } else {
    require_once( sf_wp_path() . ‘/wp-load.php’ );
    }
    ?>

    But still getting same error message as above. Please advise.

    Thanks

    #44527
    junetwood
    Member
    Post count: 11

    Hi – I am having the same issue as the others

    Warning: require_once(D:\Hosting\5068133\html\wp-content\themes\dante\swift-framework\sf-shortcodes\interface.php/wp-load.php) [function.require-once]: failed to open stream: No such file or directory in D:\Hosting\5068133\html\wp-content\themes\dante\swift-framework\sf-shortcodes\config.php on line 17

    Fatal error: require_once() [function.require]: Failed opening required β€˜D:\Hosting\5068133\html\wp-content\themes\dante\swift-framework\sf-shortcodes\interface.php/wp-load.php’ (include_path=’.;C:\php5\pear’) in D:\Hosting\5068133\html\wp-content\themes\dante\swift-framework\sf-shortcodes\config.php on line 17

    I’ve follow the directions and edited line 17 as you can see:

    <?php
    if (!function_exists(β€˜sf_wp_path’)) {
    function sf_wp_path() {
    if (strstr($_SERVER[“SCRIPT_FILENAME”], β€œ/wp-content/”)) {
    return preg_replace(β€œ/\/wp-content\/.*/”, β€œβ€, $_SERVER[“SCRIPT_FILENAME”]);
    } else {
    return preg_replace(β€œ/\/[^\/]+?\/themes\/.*/”, β€œβ€, $_SERVER[“SCRIPT_FILENAME”]);
    }
    }
    }

    $wp_path = sf_wp_path();

    if (strpos($wp_path, β€˜/’) !== false) {
    require_once( $wp_path . β€˜/wp-load.php’ );
    } else {
    require_once( sf_wp_path() . β€˜/wp-load.php’ );
    }
    ?>

    But still getting same error message as above. Please advise.

    Thanks

    #44559
    Swift Ideas – Ed
    Keymaster
    Post count: 15264
    #44667
    junetwood
    Member
    Post count: 11

    Hi, I edited it correctly this time and still getting an error on line 17

    Please help.

    <?php
    if (!function_exists(‘sf_wp_path’)) {
    function sf_wp_path() {
    if (strstr($_SERVER[“SCRIPT_FILENAME”], “/wp-content/”)) {
    return preg_replace(“/\/wp-content\/.*/”, “”, $_SERVER[“SCRIPT_FILENAME”]);
    } else {
    return preg_replace(“/\/[^\/]+?\/themes\/.*/”, “”, $_SERVER[“SCRIPT_FILENAME”]);
    }
    }
    }

    $wp_path = sf_wp_path();

    if (strpos($wp_path, ‘/’) !== false) {
    require_once( $wp_path . ‘/wp-load.php’ );
    } else {
    require_once( sf_wp_path() . ‘\wp-load.php’ );
    }
    ?>

    #44736
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    @junetwood – can you post the whole error message?

    If you reply with a link/login to your site, I’ll take a look.

    – Ed

    #45070
    junetwood
    Member
    Post count: 11
    This reply has been marked as private.
    #45271
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi June,

    Just fixed it for you. Please add the following to the child theme functions.php file:

    function sf_wp_path() {
    $absolute_path = __FILE__;
    $file_path = explode( 'wp-content', $absolute_path );
    $wp_path = $file_path[0];
    return $wp_path;
    }

    – Ed

    #45433
    junetwood
    Member
    Post count: 11
    This reply has been marked as private.
    #46341
    Melanie – SUPPORT
    Member
    Post count: 11032

    I’m afraid you cannot search into dante forum only, but you will see the forum the post is in right next to the post title. Cheers

Viewing 15 posts - 1 through 15 (of 37 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register