• Resolved fhithich

    (@fhithich)


    I managed to get access to the Premium Plan which cured my previous problem.

    Yesterday I successfully created a post with map using
    [osmap markers=”NY37450883!red;High Pike|NY38790956!green;Scandale Pass”]

    But today a post with this failed
    [osmap markers=”NZ65401023;Nanny’s Nook”]

    I’ve actually pruned this down to the minimum as I wanted two markers but I just can’t see what is wrong.

    However converting the grid ref to lat/long does work
    [osmap markers=”54.483212,-0.992078;Nanny’s Nook”]

    I’m confused. Any help appreciated.

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author skirridsystems

    (@skirridsystems)

    You haven’t said what the failure is, nor given me a URL to look at. I can’t see any problem with this shortcode when I try it on my site.

    Thread Starter fhithich

    (@fhithich)

    Sorry.

    I thought the best way to illustrate my problem is by editing an old post so take

    https://www.fhithich.uk/?p=23127

    I’ve removed the old <–raw–> coding and added two maps
    [osmap markers=”NZ58421272”]
    [osmap markers=”54.506437,-1.099305”]

    The 2nd is a straight conversion of the OS Grid. But both give a grey rectangle which confuses me even more.

    In desperation, I added a 3rd map using the coding that worked for me yesterday:
    [osmap markers=”54.483212,-0.992078″]

    And still does.
    Thanks, Mick Garratt

    Cut and paste of exact posting:
    “…
    The good side of humanity.
    [osmap markers=”NZ58421272”]
    [osmap markers=”54.506437,-1.099305”]
    [osmap markers=”54.483212,-0.992078″]

    Plugin Author skirridsystems

    (@skirridsystems)

    This is really strange. One thing I notice is that the quotation marks you’re using look more like ‘smart quotes’, i.e. the curly ones that MS Word substitutes for the plain ascii quotes. I don’t know if that is the problem, but if I copy and paste your shortcode onto my site, I see the same problem. If I delete the double quotes and add them back in manually using shift-2 on my keyboard, then it all works fine. WordPress will only recognise plain ascii quote marks, either single or double, for shortcode purposes.

    You can get away without quotes at all if there are no spaces or funny characters in the shortcode attribute. You could try [osmap markers=NZ58421272]. Unfortunately that won’t work when you want to add a label which includes spaces or apostrophes, such as Nanny’s Nook.

    Are you pasting in the shortcode from somewhere else? Is one of your plugins doing some clever substitution on quotes to pretty them up, and breaking shortcodes in the process? I think you’re using the standard 2017 theme so that shouldn’t be a problem.

    Thread Starter fhithich

    (@fhithich)

    Just spotted the closing quotation marks in my shortcode are different.

    The ones that don’t work are ” (decimal Unicode number = 8221)
    and the one that does is ″ (decimal Unicode number = 8243)

    Subtle, hadn’t realised there was a difference,

    For info my keyboard gives ” (decimal Unicode number = 8220)

    I haven’t tried whether this is the problem but suspect it is.

    Thread Starter fhithich

    (@fhithich)

    Ah, crossed in transit

    Thread Starter fhithich

    (@fhithich)

    Yes, that’s cracked it.

    Thanks, sorry to trouble you. I’m aware of the problem now.

    By the way, I’m using a Mac.

    Plugin Author skirridsystems

    (@skirridsystems)

    Ah, right, I hadn’t thought about a Mac keyboard. So how did you get the working quotes on your keyboard? I’ll add that to the documentation.

    Thread Starter fhithich

    (@fhithich)

    In the end, I started by copying and pasting an example from your https://skirridsystems.co.uk/wordpress-plugins/os-datahub-maps/ but somehow the last quote must have got corrupted. I can’t remember whether if at one point I cut the last quotation mark and merely added one in using the keyboard (“). Or it may have happened when I flipped between ‘visual’ and ‘text’ on the WordPress edit screen. I could experiment if you want.

    On most Mac programs, there is an option ‘Emoji & symbols’ under ‘Edit’ which gives the following double quotes:

    RIGHT DOUBLE QUOTATION MARK ”
    QUOTATION MARK ”
    DOUBLE PRIME ″
    DOUBLE ACUTE ACCENT ?
    HEAVY DOUBLE COMMA QUOTATION MARK ORNAMENT ?

    Again I would have to experiment to decipher. But I’ve just created a crib sheet.

    Thanks again. Mick Garratt

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Short code format’ is closed to new replies.