Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Cannot open Swift Framework Shortcodes
New Landing › How can we help? › Themeforest Theme Support › Dante › Cannot open Swift Framework Shortcodes
- This topic has 36 replies, 8 voices, and was last updated 10 years by Swift Ideas – Ed.
-
Posted in: Dante
-
December 12, 2013 at 3:36 am #36658
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
December 12, 2013 at 6:03 pm #36792This works on Linux.
Windows does not seem to be supported!December 13, 2013 at 5:27 pm #37016Hi 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
January 22, 2014 at 6:30 am #43972Hello 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
January 22, 2014 at 6:55 am #43973ok, I changed line 17. and everything is ok π
January 22, 2014 at 8:00 am #43976Glad you sorted it!
– Ed
January 22, 2014 at 7:21 pm #44170Hi – 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
January 24, 2014 at 3:52 pm #44527Hi β 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
January 24, 2014 at 8:18 pm #44559Hi Junet,
Instead of doing the above, try this: http://support.swiftideas.net/forums/topic/cannot-open-swift-framework-shortcodes/#post-37016
– Ed
January 25, 2014 at 3:26 pm #44667Hi, 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’ );
}
?>January 26, 2014 at 10:10 am #44736@junetwood – can you post the whole error message?
If you reply with a link/login to your site, I’ll take a look.
– Ed
January 27, 2014 at 4:24 pm #45070This reply has been marked as private.January 28, 2014 at 10:48 am #45271Hi 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
January 28, 2014 at 10:57 pm #45433This reply has been marked as private.February 3, 2014 at 9:30 am #46341I’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
-
Posted in: Dante
You must be logged in and have valid license to reply to this topic.