Easy Blogging - Menu Addon Bug

Hiya guys.

I think I found a small bug in the menu addon of Easy Blogging.

When I add a new menu item and select an icon (I've tried everything) the script doesn't save the icon location.

I've put it in by hand, not a problem, but just to get the perfect plugin for you guys,

  • Alexander
    • DEV MAN’s Mascot

    Hey there @jenkisan,

    I just tested this and it worked ok for me. You do need to press "insert into post", after selecting an image instead of save, as this button returns the image to the page you're working in. This could be the issue you're having.

    Thanks for being a WPMU DEV member. Let us know if we can be of any further assistance.
    Best regards,

  • Jeff
    • Site Builder, Child of Zeus

    Hi, thanks for testing this out. I was checking the code and it looks correct in fact.

    The problem is exactly that. When I press Insert into Post I get an empty string. See screenshot attached. I tried different methods including direct url but I always get the error below. What do you think?

  • Alexander
    • DEV MAN’s Mascot

    @jenkisan,

    That error looks like it's just trying to find an image that was originally stored as "undefined"

    Can you try removing that menu icon, then adding it again and checking for errors while you're adding it?

    Also, can you confirm that you are using the latest version of Easy Blogging?

    Thanks!

  • Jeff
    • Site Builder, Child of Zeus

    I tried to get the console output in the moment I add the image but all it does after you press insert into post is go straight to the screenshot I attached with the same error.

    Easy Blogging is v3.3

    If you can just tell me where I can manually insert the image url in the db I can at least fix this while we sort it out. Thanks

  • Alexander
    • DEV MAN’s Mascot

    Hey @jenkisan,

    Thanks for the extra info. I'm still not quite sure what's happening, and I really wouldn't advise setting it directly in the database.

    In the image URL field, can you see if it accepts a link directly?

    I'm going to tag the developer here to see if he has any feedback on this undefined url.

    Thanks!

  • Jeff
    • Site Builder, Child of Zeus

    If you remember from my first post, this is the first test I ran. When I press insert I get the same error.

    I'm also a developer so not a problem to insert into the db directly as long as you tell me a little about where, I can figure out how. unfortunately now I need to activate the menu item for users to use and it needs an icon, at least temporarily.

    Thanks

  • Alexander
    • DEV MAN’s Mascot

    Hi again @jenkisan,

    I'm sorry for the redundancy, I just wanted to double check for before getting in touch with the developer. To be honest I'm not that familiar with the inner workings of this plugin or where that field is stored in the db, but we'll see what feedback the developer has here

    Best regards

  • Vladislav
    • Dead Eye Dev

    Hello,

    Depending on whether your site is a network or a single install, the menu items are stored in your sitemeta or options table, keyed under "wdeb_menu_items". The items are stored as a serialized array, so manually replacing the item link in question could be a bit more involved, but certainly not impossible. Perhaps an easier way would be to just add a new menu item. If the bug manifests again, you can set the value of the appropriate hidden field to your icon image full URL using something like Chrome Inspector or Firebug - the field is type="hidden" and its ID is "wdeb_menu_items-new-icon".

    Of course, neither of those is a solution at all, both are just a quick and dirty way out. I would also really like to address this issue properly, in plugin. Unfortunately, I haven't been able to reproduce the issue you experienced locally, so it's possible we're possibly dealing with a plugin conflict. Prior to opening the media popup, do you have any javascript issues reported in your console? Also, do you have any plugins active that could affect media upload dialog in some way?

  • Ben
    • The Reaper

    @Vladislav @Alexander Rohmann @Jeff

    I am getting the same issue, and having trouble resolving it, did anybody sort this out yet?

    3 days ago it was working, I installed a few plugins and wrote one of my own.

    Trying to debug it I deactivated those plugins and completely removed them from the plugins directory outside the wordpress directories....however the issue still exists :slight_frown:

    I had there being "unknown" issues and would love to be able to know what happened, if anybody knows or has any suggestions I would love to know!

  • Ben
    • The Reaper

    @Vladislav @Alexander Rohmann @Jeff

    Gentlemen, I have a follow up.

    I was testing on another site (which does have it working and a I noticed a slight difference...

    When clicking choose icon, then pop up comes up, then navigating to the media library, selecting an image...

    I noticed that the link url is blank...manually putting in the image's full url path into the link url makes. I noticed on my working site that this field is filled...so wonder if one might know how i got that screwed up somewhere and how i can set it back!

    FOLLOW UP TO FOLLOW UP, ISSUE RESOLVED, POSSIBLE BUG IN PLUGIN

    So when trying to play with things in my site, I changed the default setting:

    image_default_link_type

    from 'file' to 'none'

    this setting is located by visiting:

    /wp-admin/options.php

    Making this change is what is causing the issue.

    It would be better if easy blogging could grab the file path of the image from another location so that the image_default_link_type setting would not effect the plugin.

    Hope that helps solve the mystery.

    Thanks.

  • Ben
    • The Reaper

    @Vladislav @Alexander Rohmann @Jeff

    Gentlemen, I have a follow up.

    I was testing on another site (which does have it working and a I noticed a slight difference...

    When clicking choose icon, then pop up comes up, then navigating to the media library, selecting an image...

    I noticed that the link url is blank...manually putting in the image's full url path into the link url makes. I noticed on my working site that this field is filled...so wonder if one might know how i got that screwed up somewhere and how i can set it back!

    FOLLOW UP TO FOLLOW UP, ISSUE RESOLVED, POSSIBLE BUG IN PLUGIN

    So when trying to play with things in my site, I changed the default setting:

    image_default_link_type

    from 'file' to 'none'

    this setting is located by visiting:

    /wp-admin/options.php

    Making this change is what is causing the issue.

    It would be better if easy blogging could grab the file path of the image from another location so that the image_default_link_type setting would not effect the plugin.

    Hope that helps solve the mystery.

    Thanks.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.