hello Everyone, I trying to get schema.org structured data formats working for a news page.
The code below is the main code for the News Article as produced in Wappler. Everything works fine for me except when I test the page here( structured testing tool) I get the Wappler bindings code like {{newsDetail.data.newsDetail[0].title}}
instead of the actual information from the Db. Kindly see the attached Image. The actual article title did not show up, the datePublished even though displays correctly in the browser is not being recorgnised by the testing tool etc. Any ideas what I am doing wrong?
This has happened to me when I try to audit for SEO pages created with Wappler. Although pages rank well it is not possible to audit them
POSSIBLE SOLUTION - AT LEAST THIS WORKS FOR ME
(1)Open your webpage in a browser
(2)Save as html
(3)Upload the html on your server
(4)Validate the html page with Google
If everything is validating ok then your ‘Wappler created page’ will work nicely.
If it is not validating, make changes you need on your ‘Wappler created page’ and repeat from step (1).
Thanks @t11.
indeed, when I do it in HTML, it works fine but that is not what I want unfortunately. I suspect I’m missing something. I have just tried using the JSON-LD format but that also did not render the bindings. Hoping @Teodor has an work around or tip for this… keeping fingers crossed.
On your Wappler Created page debug it.
From the response tab copy the json result.
Paste the copied json structure where you want to validate it (I use JSON lint)
And validate it.
This sadly happens with a few systems even the Facebook debugger tool can not read the data bindings inside the OpenGraph tags.
Pretty much anything that crawls a page that can not parse the javascript entries is going to produce this type of result.
The only real way around this is using a service like https://prerender.io/
From what I have read is that the testing tool for structures data doesn’t render javascript, but the google bot does. So it should index it correctly.
Thanks @patrick I understand this now. I am worried though about sharing. I tried sharing a page on Whatsapp and instead of the headline, the Wappler binding was rather picked up.
Yes this also happens.For example same goes for FB sharing but there is a workaround.
The most safe solution is to use ‘normal’ php for metatags which is always rendered.
@t11 Nico, do you have a standard way you are achieving this.
Are you using a server connect database query and then pulling the data into app connect first and then parsing it using php, or are you somehow accessing the results of the server connect query bypassing App Connect to echo the data into the meta tags.
I have to admit I haven’t played with it too much, so i am being a little lazy just asking, but being hopeful I can save some time.
Since most front-end pages are filtered through GET_variables
(1) I create a normal PDO connection
(2) Create the query needed
(3) Apply the meta-tags inside the <head>
Ok, that makes sense, so just for that one part you are just using php fully for the database connection and query and echo of the results.
I kind of imagined that would be the easiest way too, but I have become used to my lovely Server Connect, so was wondering.
Your way also makes it that I probably wouldn’t even need to change my App Root from body to page if php is taking care of the head section stuff.
Thanks Nico, for confirming, I would have been sad if I had done that and everyone else was accessing the Server Connect query results in an easier way.