StyledMaps: Backslashes added by saving

Home Forums MapPress Support StyledMaps: Backslashes added by saving

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #18925
    Krisse
    Participant

      Hello

      PHP: 8.0.1

      DB: Maria DB 10.5.6

      I tried to set a JSON-style in the “StyledMap”-Section.

      Something like that:

      [
      {
      “featureType”: “administrative”,
      “elementType”: “geometry.fill”,
      “stylers”: [
      {
      “visibility”: “off”
      }
      }
      ]

      But everytime I save the configs, backslashes are added and leaving the JSON like that and off course broken and not working:

      [
      {
      \”featureType\”: \”administrative\”,
      \”elementType\”: \”geometry.fill\”,
      \”stylers\”: [
      {
      \”visibility\”: \”off\”
      }
      ]
      },

      Has somebody dealed with this issue, as well. Maybe an idea for an workaround?

       

      #18927
      Chris
      Keymaster

        Hi,

        Sorry to hear that, it sounds like a bug. What version of MapPress are you using?

        #18929
        Chris
        Keymaster

          Does this happen with *new* styles you’re adding, or only with styles from a prior version of the plugin?

          I’m aware of an issue where styles that existed before the upgrade had extra slashes (WP added them to form data). They can be removed using an online tool like this one:
          https://www.tools4noobs.com/online_php_functions/stripslashes/

          But that won’t work if the slashes are added on each save.

          Can you can send a login using the contact form? I’d like to have a look.

          #18928
          Krisse
          Participant

            2.62.7 Pro

            #18932
            Chris
            Keymaster

              Hi,

              I think this is now fixed in 2.62.8. Thank you for reporting it! If you have any other questions or issues please let me know.

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