WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Custom placeholders attributes empty space issue! (10 posts)

  1. Marketing Master
    Member
    Posted 1 year ago #

    I’m using placeholders like this:

    #_ATT{ EXAMPLE}

    Yes, after bracket is one empty space.

    After last update this placeholder stop working. When I put value in this placeholder and save it, value in field is not saved and field is empty. I old events this values are OK and displayed in events. When I remove space after bracket everything works fine, but I lose values in old events.
    This empty space is not mandatory, I suppose I put it there by mistake when programming.

    Any suggestions?

    Thx, BR

    http://wordpress.org/extend/plugins/events-manager/

  2. angelo
    NetWebLogic Support
    Posted 1 year ago #

    I see, maybe you can use custom conditional placeholder for that

    e.g.
    {has_example_with_space} #_ATT{ EXAMPLE} {/has_example_with_space}
    {has_example_without_space} #_ATT{EXAMPLE} {/has_example_without_space}

    http://snippets.webaware.com.au/snippets/events-manager-conditional-placeholders-for-custom-attributes/

  3. Marketing Master
    Member
    Posted 1 year ago #

    Yes, but I want to use just one (the old one with space). I'm using the new one (without space) temporary because the old one stop working. Now I have two placeholders with the same name in the form . I don't want that.
    I have 50 post with old placeholder (with space) and just few with the new one (without space). I just wont manage the old one to work like was work before upgrade.

    Thx, BR

  4. angelo
    NetWebLogic Support
    Posted 1 year ago #

    yes, you can use just one e.g. #_ATT{EXAMPLE} the above suggestion (using conditional placeholder) is just a workaround for your old events

  5. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    what version did you upgrade from/to?

  6. Marketing Master
    Member
    Posted 1 year ago #

    I think this happened after upgrade from 5.4 to 5.4.1.

    Thx, BR

  7. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    I can't think of any changes in those updates that'd do this, but I think the ultimate solution is to correct that extra space. Try running this sort of SQL e.g. using phpMyAdmin or the adminer plugin.

    UPDATE wp_postmeta SET meta_key='EXAMPLE' WHERE meta_key=' EXAMPLE';

  8. Marketing Master
    Member
    Posted 1 year ago #

    Can I change those meta_keys "at once", there is 100+ of them?

    I also notice if I change or delete values in those old fields with space and then update/save post, values in the field doesn't change and stay the same like was before I made changes.

    Thx, BR

  9. angelo
    NetWebLogic Support
    Posted 1 year ago #

    I tried the exact example above using @Marcus sql suggestion and it seems to worked fine; can I know the exact sql you used?

  10. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    yes, it'll change them all in one go.

    if your valus aren't changing whjilst using phpmyadmin or something like that, then the problem is not EM-related, you should ask your hosts about this. Maybe the username you're using doesn't have the right privelages to update the table.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.