WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Widget
[resolved] Enabling Custom Post Widget blocks theme TinyMCE buttons (10 posts)

  1. Norm Sash
    Member
    Posted 1 year ago #

    My theme (Photocrati) puts several buttons on the TinyMCE editor. If I enable Custom Post Widget then those theme buttons are "blocked" and don't show (see image). Theme vendor says that this is a plugin issue so I'm posting here to see if you will look at it. I can do some testing of some ideas if you want me to.

    screenshot here

  2. Johan van der Wijk
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Norm,

    Even though the screenshot clearly shows what is going wrong, I don't know how to fix this. For the 'Add Content Block' button I am using the default WordPress styles, so I am not sure why your theme's custom buttons disappear.

    This might be a CSS/HTML issue, or a conflict in calling the buttons. Could you check in the source of your page if the html code for the buttons is being added?

  3. Norm Sash
    Member
    Posted 1 year ago #

    Thanks for looking at this, Johan. I checked the markup on the page with Custom Content Post enabled and disabled. Screenshot below. From what I can tell when Custom Content Post is enabled then there is no html in the page for the Photocrati buttons.

    Screenshot here

  4. Johan van der Wijk
    Member
    Plugin Author

    Posted 1 year ago #

    Ah, so it seems there is some kind of conflict in adding the buttons.

    Could you try commenting out line 232 of post-widget.php: add_action('admin_head','check_post_type_and_remove_media_buttons');

    Also, can you enable debug in your wp-config.php file to see if any error messages are displayed?

  5. Norm Sash
    Member
    Posted 1 year ago #

    Commenting out line 232 worked as far as the other TinyMCE buttons disappearing. Of course, content block button was not added, but I think you were expecting that. So at least you are honing in on the area of conflict.

    I enabled debug and I am seeing a number of errors (more than I cared to see.) But I didn't see any error that looked like your plugin, or that might be related to the problem.

  6. Johan van der Wijk
    Member
    Plugin Author

    Posted 1 year ago #

    The only possible issue I can think of is that there is a duplicate function name.

    Could you check if the function name add_content_block_icon is used in the Photocrati theme?

  7. Norm Sash
    Member
    Posted 1 year ago #

    I've been searching and I can't seem to find any reference to add_content_block_icon in the Photocrati files. I also renamed the function in Custom Post Widget to be cpw_add_content_block_icon and that didn't seem to make any difference either.

  8. Johan van der Wijk
    Member
    Plugin Author

    Posted 1 year ago #

    Have you already created a support ticket with Photocrati about this issue? They might be using a non-standard method for adding their buttons which causes a conflict. My plugin uses the media_buttons_context WordPress function which should allow for multiple buttons to be added.

  9. Johan van der Wijk
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Norm, did you manage to solve this issue?

  10. Norm Sash
    Member
    Posted 1 year ago #

    Hey Johan... thanks for following up on this. The problem isn't resolved yet, however, with your help at debugging I documented this and sent it over to Photocrati for resolution. Prior to this I had sent it to them and they claimed it was a plugin error. However, with the debugging information I sent to them they have agreed to fix the problem. I received one patch from them and it did fix the menu problem, but it broke other things so they are still working on it. Last response from them is that they have more work to do on it and it likely will not be fixed until the next major update of the theme.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic