Possible Bug with editing locations

Home Forums Store Locator Plus Possible Bug with editing locations

This topic contains 6 replies, has 3 voices, and was last updated by  Cici 5 days, 6 hours ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #46777

    karl1
    Participant

    I had one of my customers complain about not being able to edit locations in the backend. When they clicked the edit pen the only thing that happens is that the window.location gets a # in the end.

    I did some digging and found out that when the pen is clicked the SLP_Location_Editor function rolls off and starts with var add_edit_div = jQuery( ‘#wpcsl-option-add’ );

    This probably works in most cases but in my localization (swedish) the correct selector is #wpcsl-option-lägg_till, so when my customers click the edit button the div neither shows or gets its fields populated. Obviously I fixed it and will keep doing it if necessary but it would be nice if future updates would deal with this.

    This is on a debian server with php 5.6.30, latest slp, latest wp and no add-ons.

    Thanks!

    #46780

    Cici
    Keymaster

    When it comes to the languages, all our updates to the SLP languages goes through the WP Translate project.  We cannot write the code for every language that uses SLP unfortunately, that is beyond our capabilities. So we need the users to help with that. We have worked with  WPML over the years…but something basic goes through the Translation Team

    https://docs.storelocatorplus.com/blog/tag/translate-wp/

    #46781

    karl1
    Participant

    Yeah I get that, one solution would be to not translate the id of the element so that it’s #wpcsl-option-add in all languages or give it another identifier as well to extract the language-specific one with. I’ll look into signing up for the translation team but it seems like the problem here is probably that too much was translated in this case imho.

    Anyhow, great plugin and I hope I don’t sound all negative!

    #46785

    Cici
    Keymaster

    No Problem. Thanks for the info.

    #46805

    vissersj
    Participant

    Hi Karl,

    I think I have the same issue (Dutch), but could you provide us with the fix? I can’t find ‘#wpcsl-option-add in the Po file..

    I will appreciate you help!

    Sjors

    #46806

    karl1
    Participant

    <span style=”color: #000000; font-family: Helvetica; font-size: 12px; text-size-adjust: auto;”>I didn’t find it in the po file but in the ~/wp-content/plugins/store-locator-le/js/admin-locations-tab.js on line 357.</span>

    var add_edit_div = jQuery( ‘#wpcsl-option-add-in-dutch’ );

    Hope it helps!

    #46810

    Cici
    Keymaster

    Lance has looked into it and I think he communicated with one of you, not sure, but he believes he has fixed it with SLP 4.8.3.

    His answer to the bug

    “The issue is related to the translation strings and how SLP is creating the HTML element structure. It is using translated names for div IDs which is breaking the new JavaScript-based editor. It will require a patch to resolve this in SLP.  Not sure how long this bug has been in the code, but it never had an impact until we started modernizing the interface to newer JavaScript and HTML 5 standards. ”

     

    COuld  you guys update to 4.8.3 and see if that fixed your issue?

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.