New Landing How can we help? Cardinal Swift Page Builder not loading

Viewing 8 posts - 1 through 8 (of 8 total)
  • Posted in: Cardinal
  • #139161
    sbwright
    Member
    Post count: 6

    Hello,

    I am attempting to create a local site for development purposes using the Cardinal theme. For some reason, the Swift Page Builder will not load on any pages or posts. Note that it works fine on the production site, but locally no luck.

    So far I’ve attempted removing all plug-ins, specifying the language (en_US) in the wp-config file, upgrading WordPress, and upgrading to the latest version of Cardinal. My last attempt was a clean WordPress 4.1 install and Cardinal theme, version 1.90.

    Here is a screen shot of what I see in the page editor: https://www.evernote.com/shard/s134/sh/cb42a0f4-6de7-40fc-806c-27646ad4246d/eebe05ae738e1a817a1dd074c1190844

    Note there is a Javascript error for TinyMCE related to the language: “Uncaught TypeError: undefined is not a function”, and it relates to the line “tinyMCE.addToLang(…”.

    Thanks in advance for your help!

    Stacey

    #139314
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    The only reason it wouldn’t work is a plugin conflict, have you tried version 1.95

    – Kyle

    #139447
    sbwright
    Member
    Post count: 6

    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?

    #139457
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    You got something wrong in your WordPress installation. From the screenshot you provided we can see that you have more than 200 errors in your javascript console.

    The Swift Page Builder needs the Tiny Mce Editor to be able to work.
    Try to install it again because something went wrong.

    -Rui

    #139788
    sbwright
    Member
    Post count: 6

    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.

    #139805
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    yes but probably the default theme don’t do any specific use for the tiny editor and we do it with the page builder.

    Something is wrong on your local install, check for the log files in Xampp or Mamo.
    Has you said the same files worked fine in the live server.

    -Rui

    #140245
    sbwright
    Member
    Post count: 6

    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.

    #140534
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Glad you sorted. Thanks for sharing that info will pass it to the development team.

    -Rui

Viewing 8 posts - 1 through 8 (of 8 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