Support » Plugin: Simple Multiple Featured Images » Error “smfiShortcodesButtonsPlugin”

  • I get the error message on editor “Failed to initialize plugin: “smfiShortcodesButtonsPlugin”

    I just install plugin, i get this error message only on custom post types, even on WooCommerce product page. The message appear on editor section.

    I disabled shortcodes by filter and error is gone but i think its a bug.

    Is it possible to disable post type: “post” i need it only for pages.

    Its a good idea to display metabox by default on side instead on main column.

    Its a good idea to set maximum allowed images by filter, we need only one image, but admins may add more it good to be restricted.

    I use classic editor so blocks are disabled.

    Thanks=

    • This topic was modified 1 month, 1 week ago by toto.
    • This topic was modified 1 month, 1 week ago by toto.
    • This topic was modified 1 month, 1 week ago by toto.
    • This topic was modified 1 month, 1 week ago by toto.
    • This topic was modified 1 month, 1 week ago by toto.
    • This topic was modified 1 month, 1 week ago by toto.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Roman Bauer

    (@roba87)

    Hi,

    I will look at the problem next week and give feedback to the problem and your questions. Greeting

    • This reply was modified 3 weeks, 4 days ago by Roman Bauer.
    Plugin Author Roman Bauer

    (@roba87)

    I can not reproduce the error. I have created a custom post type and activated the Classic Editor via plugin. The featured images are displayed correctly. WordPress is on version 5.2.4.

    What exactly do I have to do to provoke the error? Which WordPress version and configuration do you use? Where did you see the error?

    Is it possible to disable post type: “post” i need it only for pages?

    Yes, you can use the filter smfi_supported_post_types. Use the filter and return a new array with the element “page”.

    Its a good idea to display metabox by default on side instead of on main column.

    The plugin is designed to handle larger amounts of images. Therefore, the images are displayed by default in the main column. For a smaller amount of images maybe the plugin Dynamic Feauted Image is more suitable. It is shown by default in the side column.

    Maybe I’ll change it later if there are more requests.

    Its a good idea to set maximum allowed images by filter, we need only one image, but admins may add more it good to be restricted.

    I’ll put that in the next version.

    Plugin Author Roman Bauer

    (@roba87)

    I added the hook smfi_img_limit. It allows you limit the number of images.
    Just look at the documentation for this: https://www.roman-bauer-web.de/wordpress-plugin-smfi.

    Your error message (“Failed to initialize plugin: “smfiShortcodesButtonsPlugin”) is definitely a bug. I think the problem is somewhere in Javascript. Something goes wrong in the main script. This causes the other scripts to fail. In your example, it’s the script that provides the shortcode functionality.

    I can not reproduce the error. I would have to know exactly what I have to do for it. Then I could find the bug and fix it.

    Thanks for the great plugin.
    I would like to say that I also have the same issue.

    I guess the Error occurs because the custom post type does not support thumbnails.

    Also, I tried the filter “smfi_supported_post_types” to return only “post” as I wanted to disable it for pages, but that didn’t work, i used the sample code in your documentation website.

    I appreciate fixing this error, and adding ability to exclude the feature for specific post types.

    thanks.

    Plugin Author Roman Bauer

    (@roba87)

    I’ll look at the next week again and get back to you.

    Plugin Author Roman Bauer

    (@roba87)

    I think I could reproduce the error. I’ll will fix it next week and make a new release.

    The error occurs in connection with the supported_post_type hook. For example, if you do that:

    add_filter( ‘smfi_supported_post_types’, ‘change_smfi_supported_post_types’ );
    function change_smfi_supported_post_types( $current_supported_post_types) {
    $my_supported_types = array(‘post’);
    return $my_supported_types ;
    }

    As a result, the featured images should only be displayed within a post. Page and other custom post types should not display the featured images. If you now open a page or custom post type they will display the error message described above. The error message is displayed because it loads a script, which should not be loaded.

    Plugin Author Roman Bauer

    (@roba87)

    I think i fixed the shortcode bug. Please update the plugin to version 1.1.1 and check if the error is still coming.

    Greetings

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.