PowerGrid CSV Linking issues


(David Elliott) #1

Hi there

I can populate my PowerGrid CSV with the csv file without any issues FOR TEXT.

However, trying to insert an html link to an image is not working for me.

  1. Is a relative link relative to the php file containing the Table or to the csv file populating it. I am guessing the first.

file structure is:

the file is kraft.php and the image i want to link is kraft.kraft-images/agro-stickers-f.jpg

I used the link <A href=“kraft-images/agro-stickers-f.jpg">Agro

The browser shows the table correctly

But on selecting the image I get the following

The requested URL /kraft/“kraft-images/agro-stickers-f.jpg" was not found on this server.

I have no idea where the odd characters have come from. Did I forget to escape something?

David


(Don H) #2

The curly quote at the start of the href value is causing the issue. Make sure to use regular, straight quotes for anything to do with actual html code.


(David Elliott) #3

They are just straight double quotes from my KB, Don.

I modified the link to
<A href ”kraft-images/agro-stickers-r.jpg">Agro
and inspecting the element in kraft.php I see
<a href="" ”kraft-images="" agro-stickers-r.jpg”="">Agro = $0

so i modified it again to escape the backslash
<A href ”kraft-images/agro-stickers-r.jpg>Agro
and inspecting the element in kraft.php I see
<a href="" ”kraft-images="" agro-stickers-r.jpg”="">Agro = $0

I have re-type the cell in numbers but I cannot see where the SPACE is coming from.

Puzzled


(David Elliott) #4

Finally got it to look correct in kraft.php

<a href="“kraft-images/agro-stickers-r.jpg”"><Agro = $0
but when i click on the link I get weird characters again.

The requested URL /kraft/“kraft-images/agro-stickers-r.jpg” was not found on this server.

May have something to do with this error message I was getting last month:
27%20pm

Buggered if I know.


(Mathew Mitchell) #5

Please look carefully. You still have curly quotes in some areas. The link simply won’t work with them. Using your keyboard does not always result in straight quotes. Note that:

”kraft-images/agro-stickers-r.jpg"

… has a curly quote before the “k” of kraft. If you can’t see the difference between that quotation mark and the one at the end then perhaps new eyeglasses needed. :slight_smile:

It may seem like a super small thing, but it makes all the difference in this case.


(David Elliott) #6

Thank you for pointing that out to me Matthew but I suggest you keep your smart arse comments to yourself.


(David Elliott) #7

Oops just spotted your smiley face. Sorry about that.


(David Elliott) #8

Edit → Substitutions → check or uncheck Smart Quotes in Numbers

Works like a treat now.


(Mathew Mitchell) #9

The difference between straight and curly quotes IS subtle if you are not used to coding. In the regular world who cares about the difference very much? But in coding it makes all the difference in the world. Almost all of us have been tripped up the straight-vs-curly issue at one point. Glad all is sorted now!