Digital experiences for all disciplines
Forum Replies Created
-
Posted in: We hit Power Elite.
-
We have a few additional template files. Here is screenshot of what’s in that folder.
https://www.evernote.com/shard/s134/sh/86d60264-704e-40fd-a764-2cdb3089e873/a4a8bd14f00b2a68e10175c7c7e07bbfIt seems to fix the issue if I add the following to my child theme’s functions.php:
include_once( get_template_directory() . '/swift-framework' . '/core/sf-functions.php' ); // fix for 'Call to undefined function sf_get_category_list'
I am having this same issue. We are using a child theme. I do not get the error if I use Cardinal instead of Cardinal Child. We get the error
“Fatal error: Call to undefined function sf_get_category_list() in [serverpath]/wp-content/plugins/swift-framework/includes/page-builder/shortcodes/testimonial.php on line 191”No server issues found, but I finally figured this out after a detailed look at wp-includes/class-wp-editor.php. Thought I’d post here in case anyone else has this odd-ball scenario, and there is a small tweak SwiftIdeas may want to incorporate.
As noted above, Swift Page Builder was not loading due to errors related to a call to tinyMCE.addToLang, an outdated function. The editor_settings() function in the above file led me to the solution. Around line 432, there is a line that notes “
// Try to load langs/[locale].js and langs/[locale]_dlg.js
“.Farther down on line 440 it has the following:
if ( @is_file( $path . $mce_locale . '.js' ) ) $strings .= @file_get_contents( $path . $mce_locale . '.js' ) . "\n";
In my case, my local environment had an old file en.js in the root directory… /en.js that contained the bad function call. So this was where the bad code was coming from. I deleted the file, and now Swift Page Builder loads without error (hooray!).
I then looked into why the $path variable pointed to the server root in the first place. It was correct until line 439,
$path = trailingslashit( realpath($path) );
. The realpath function was trying to verify the path to /wp-content/themes/cardinal/swift-framework/shortcodes/langs/. However, this directory does does not exist by default in the theme files. I added this directory, and now $path correctly resolves to the right directory, so is looking for the language files in the right place.All that said, you may want to consider adding a /wp-content/themes/cardinal/swift-framework/shortcodes/langs/ directory to the installed files.
Those errors only appear when the Cardinal theme is active… all seem to relate to TinyMCE not loading. It works fine with the default WP themes. I’m stumped.
Thanks, Kyle. I just tried version 1.95 of the theme, but get the same results. This is with a clean WordPress install. The only plug-in was Akismet, but I have now removed that as well. Error is “TypeError: undefined is not a function (evaluating ‘tinyMCE.addToLang’)”. Any other ideas where I may be able to look?
-
Posted in: We hit Power Elite.