• Resolved vickyf

    (@vickyf)


    Hi Camille,

    Back again with another mystery. So I had to import 600 posts related to geolocations. Using your plugin I could perfectly show them on the map, and I used the _latlngmarker custom tag to add lat/lng/marker properties for each post.

    Now everything got imported perfectly. When editing a post it shows up in the right location. However, it does not show up on the website. Here is the behavior that I observed:

    1. After import: NO pins on the map
    2. After clicking view in wordpress backend: No pin on map for that post
    3. After clicking edit and view example in wordpress backend: pin appears on the map for that post
    4. After clicking edit and save in wordpress backend: pin appears on the map for that post

    This is very odd. I just hope I don’t have to do that will all 600 posts ??

    Best

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Camille V

    (@socrapop)

    Dear vickyf,

    Where did you import you posts from? And how? Another site with Travelers’ map? Did you also import the taxonomies (especially the private taxonomies) set to those posts?

    Let me explain:

    – Travelers Map is setting the term hasmarker in a private taxonomy named cttm-markers-tax to the posts on save, when they have a marker on them.
    I did this for performance, in case you have 1000+ posts to load on a map, a query by taxonomy is much much faster than by metadata in a wordpress database.
    A private taxonomy means that the user can only change it programmatically

    -> That’s why the posts are showing on the map when you save them again.

    So if your import is not importing this private taxonomy, the problem resides here.

    • This reply was modified 4 years, 8 months ago by Camille V.
    Thread Starter vickyf

    (@vickyf)

    Hey Camille,

    I made a csv myself and imported it using Ultimate CSV Importer. The csv consists of a list of posts with title, post, category, tags, and _latlngmarker.

    So if I understand you correctly, I should add the value “hasmarker” to cttm-marker-tax variable for each post when importing?

    EDIT: I tried what I described above, and it works like a charm! Thank you very much!

    Best, Vicky

    PS: for now I resolved it by writing a script that goes through all my posts and clicks the edit button :p

    • This reply was modified 4 years, 7 months ago by vickyf.
    Plugin Author Camille V

    (@socrapop)

    Hehe nice workaround ??

    Yes if you add the taxonomy yourself, if your _latlngmarker is the same as what the plugin generate, everything should work ??

    The query in the shortcode has this argument:

      'tax_query' => array(
            array(
              'taxonomy' => 'cttm-markers-tax',
              'terms' => 'hasmarker'
            )
          ),

    Have a nice day!
    Camille

    Edit : wow I didn’t see your Edit, I’m glad it’s working ??

    • This reply was modified 4 years, 7 months ago by Camille V.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Odd behavior after CSV Import’ is closed to new replies.