Store Locator Plus® for WordPress Forums Store Locator Plus Re-editing Location Description cuts off at the first ' character

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #46847
    Super Web
    Participant

    Good morning,

    We just updated to Store Locator Plus 4.8.3 (from 4.7.11), on WordPress 4.8.1, and noticed an issue when Editing locations (that already exist). We’re using the very latest version of Chrome, version 60.0.3112.113 (updated today also).

    If the Location Description contain a ‘ character, (e.g. Brisbane’s CBD) the location description is saved without issues (the full description is visible on Store Pages, etc.)… but if you re-open the Location, the description will be cut off at the ‘ , and a \ added to the end.

    e.g. …river near Brisbane’s CBD, and 4 lane highway overlooking…
    becomes
    …river near Brisbane\

    Additionally, blank new lines (in the description field)  appear to have been replaced with the “\n” 2 characters (“\” + “n”) instead of just the a new line character.

     

    This issue appears to be caused by \’ not being equivalent to ‘  if you use “esc_textarea”. If that’s the cause, it might be resolved be replacing that with “esc_html” (where the issue occurs), but I’m not entirely sure of which file to test this in to see if that fixes our issue.

    We can somewhat get around this by copy’n’pasting the location’s description from the front end of the website, back into the Location’s description… if we remember to do this prior to saving the Location edits.

    Please could you let us know if this issue is replicable (or unique to our website setup)?

     

    Thank you.

    #46850
    Cici
    Keymaster

    Please provide the information so that we may assist you, i.e. Versions, Site Url  that the locator page is on  and your Plug-in environment.

    The information required to assist you is outlined in the read Before Posting Guidelines.

     

    #46857
    Super Web
    Participant

    Site URL: https://supergeek.com.au/
    Location Page: https://supergeek.com.au/locations/
    Example Store Page: https://supergeek.com.au/location/computer-repairs-keilor-3036/

     

    Plugin Environnent:

    Store Locator Plus:4.8.3

    Power:4.8.3

    +Pages

     

    Site URL: https://supergeek.com.au

    This Info Cached:1496702614

    Network Active:No

     

    WordPress Version:4.8.1

    PHP Version:5.6.31

    MySQL Version:5.5.55

     

    PHP Limit:1024M

    WordPress General Limit:1024M

    WordPress Admin Limit:256M

    PHP Peak RAM:137 MB

    PHP Post Max Size:64M

    #46861
    Cici
    Keymaster

    Are you referring to the back end admin location panel, or the front end? Viewing your “site location” I do not see any issues when I search by Postal code.

    If it is the back-end  look at your Display options, if it is your front end, it is most likely is your  theme or some special css that is not in the correct format. See under documentation themes, Troubleshooting , generating Store Pages, and Locator Styles

    #46866
    Super Web
    Participant

    Hi Cici,

    I’m referring to the backend Admin Location panel, when opening an existing location to edit it’s description.

    The database has the full description & it’s displayed on the front-end fine without any “extra characters”.

     

    It’s only we you go to edit the Location’s description (in Admin) that the issue occurs.

    The Store Locator Plugin is the only change (with it’s update from 4.7.11 to it’s 4.8.3) since that feature was last working. I always update it (& the “Power” plugin) separately, since when I update it always disables the “Power” plugin & I always need to update that manually via FTP/cPanel.

     

    The source code on the page (of the Admin Panel) shows a generated code error for that HTML element in the particular scenario, where a special HTML character (mainly ‘ ) is used.

    The ‘ character is the issue I’m most concerned with. The ` character doesn’t cause an issue, as it’s not being interpreted by the HTML element / Javascript as the end of string character.

     

    Does this description assist with you replicating this issue?

     

    Thank you.

    #46867
    Cici
    Keymaster

    Have you tried clearing your cache to get rid of any errors and reloading? Could you provide a screen shot?

    #46868
    Cici
    Keymaster

    If you could Provide a screen shot I can ask the developer to look at it. I edited one of my locations with an ampersand and when I went  back in the back end it was showing &amp as if it was in html but I was not getting any error messages. that would not be anything from the add-ons but part of the basic SLP core so I would need to see what you are seeing ti get his take on it. Thanks

     

    #46869
    Super Web
    Participant

    Sorry, about the delay… I did 4 screenshots, so I could clearly show the items.

    The 1st screenshot is “slp-2018-08-30-editing-before-saving.jpg”.
    It shows the “Description” field _before_ saving, with at least 1 ‘ in it.

    The 2nd screenshot is “slp-2018-08-30-editing-reloaded-after-edits.jpg”.
    It shows the reloaded “Location Editing”, after that had been saved & re-opened for further editing.

    The 3rd screenshot is “slp-2018-08-30-webinspector.jpg”.
    It shows that the textarea element on the re-opened location is only populated with the text showing on the screen.

    The 4th screenshoot is “slp-2018-08-30-htmlsourcecode.jpg”.
    Note that it shows the complete text in the source code… however the different colour syntax highlighting shows that the Javscript code is “breaking” as “\'” isn’t an encapsulated version of the ‘ character.

    I can confirm that & is reloaded as & , however note that it’s stored (from the original edit) in the database correctly. It’s only the re-open of the location (for editing) with the issue.

    As I mentioned originally, I suspect it’s a use of the WordPress “esc_textarea()” function in the code, which while it encapsulates the text for display in a <textarea> HTML element, generally needs to be re-encapsulted (again) for use in a Javascript variable).

    Thank you for looking into this for us, and I’m glad you were able to replicate this issue.
    Have a great day!

    #46875
    Cici
    Keymaster

    Thanks for providing this info Elizabeth, I have asked the developer to look into it  into it since , as you mentioned it is a WP generated  issue and it may effect other areas in coding.

     

    #46877
    Lance Cleveland
    Keymaster

    Fix coming in SLP 4.8.4.  The beta (prerelease) is out.  DO NOT use beta on a live server.

     

    https://wp.storelocatorplus.com/wp-content/uploads/2017/08/slp4.zip

     

    This is the beta-3 release and has not been fully tested.   Please test on a non-production site.

    #46878
    Super Web
    Participant

    Thank you we look forward to installing it, on our live server, once it’s officially released.

    I’ll use my copy’n’paste workaround until then, re-pasting the full description each time I edit a location.
    🙂

     

    Have a great day!

    #54609
    Cici
    Keymaster

    SLP version 4.8.6 was released to address the issues caused by WP 4.8.2 auto updates. Experience and Power have also been updated and released. SLP version 4.8.4 released this week fixed the issue you described, further update to 4.8.6 needed to address WP 4.8.2. See news release from the developer
    https://www.storelocatorplus.com/updates-to-address-wordpress-4-8-2-issues/

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.