• Resolved antwoorden

    (@antwoorden)


    To quickly add multiple events, a lot of guests use backspace after submitting an event to go back to the ‘Add event’ form, so that they don’t have to re-fill every field again. The problem is: when they create a location, the next event they submit (after using backspace) keeps the exact same location details, but a duplicate location is being created…

    So, when the exact same location details are entered as an existing location, it should assign it to that existing location, instead of creating a new (duplicate) location.
    How to realize this?

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

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    if the user just submitted a new location, then it wouldn’t be found in your locations list until published. There’s no way around that really apart from allowing users (or your guest assigned user) to publish events automatically.

    Thread Starter antwoorden

    (@antwoorden)

    The problem is both for guests and admins.

    Another example: fill in the ‘Add event’ form, and fill in the EXACT same location info as an existing location. Instead of the event being assigned to that existing location, a new location is created with the exact same details. So now you’ll have for example location-name and location-name-2.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    Hi,

    another thing you can try is to hook into em_location_validate filter and then then the user location name vs the locations already exists

    you can see the hook details at classes/em-location.php – function validate()

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    once a location is entered, you need to search for it using the autocompleter and select that location. entering he same values will create a new location.

    Thread Starter antwoorden

    (@antwoorden)

    @ Marcus: yes, guests do that, but if the location doesn’t exist, they create a new one. That’s great, but after this, they often want to add another event to this same location, and use the ‘Back to Previous page’ button in their browser so that they don’t have to fill in every event-field again (they just modify some details like the event name and then click ‘Submit event’). At this time another location is created with duplicate settings… instead of the event being assigned to the previously created location.

    @ angelo_nwl: I can’t seem to manage… will this fix be featured in the next version of Events Manager?

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    this isn’t a bug, it’s just the way the plugin works. if the event isn’t published, it won’t show up in searches. if you don’t search and select a location, it will createa new location.

    Thread Starter antwoorden

    (@antwoorden)

    It may not be a bug, but it really bugs me (because a lot of duplicate locations get created this way).

    I found a temporary ‘solution’: adding autocomplete=”off” to the location fields in location.php. This way the guests who use the back button of the browser are forced to re-enter (and thus find while typing) the previously created location.

    A better solution would be a filter that checks if the location info is exactly the same as an existing location, if yes: assign the event to that location. Can you help me with this? I think it would be a great new feature.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    hi,

    at the moment you can only do this by custom php coding which at the moment we can’t help you unfortunately but maybe it will be a feature though we can’t give an eta yet due to features which needs to be done first.

    Thread Starter antwoorden

    (@antwoorden)

    @ Angelo: it would be GREAT to see this as a new feature in a future release. Thanks in advance!

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    it is something I’d love to add in the future but this probably won’t happen anytime soon due to other features taking priority.

    more specifically, I’m thinking check for locations with very close long/latitude values and ‘suggest’ if those should be used instead. however, in your case, you’d probably still need to tweak that since we’d only check published locations.

    Thread Starter antwoorden

    (@antwoorden)

    @ Marcus: I am talking about published locations… I have it allowed for guests. So, often there are multiple locations created with exactly the same information… (when users use the back button of the browser for having fields remembered). Result: not only location-example, but also location-example-2, sometimes up to location-example-15… They all show up under Locations. I have to remove the duplicates manually from the admin panel and assign the linked events to the first created location. I’m looking forward to a ‘fix’!

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    the other option here is to force dropdowns so they can only choose locations, not enter new ones.

    Settings > General > General Options > Use dropdowns for locations?

    Thread Starter antwoorden

    (@antwoorden)

    Not an option, since they need to add several events to their own (new) location…

    can i vote for this? in the short-term i’ll try that “adding autocomplete=”off” ” solution… but some way to allow NEW locations to be added, but preventing duplicates would be really really really awesome.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Avoid duplicate locations’ is closed to new replies.