News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

The code does not match the entry

Started by marvays, March 02, 2021, 06:36:00 AM

Previous topic - Next topic

marvays

Why does joomla or Virtuemart display a different code on the site than the one written?

Editing description in category VM. I want to add microdata for FAQ. I have the code set correctly. But the web will change a bit for me.

I have saved:
<h3 itemprop="name">XXX?</h3>

In the web code I see:
<h3 >XXX?</h3>

Something will delete itemprop = "name" from <h3>.
I have the JCE editor turned off.


https://search.google.com/test/rich-results?id=wObzYi3K9bMjlJtY6P6Fbw

Jörgen

I would try without the Quix editor.

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

marvays

I see. I don't use the Quix editor, but I'll try to turn it off hard to save. One never knows. Maybe it can really have an effect.

marvays

Quote from: Jörgen on March 02, 2021, 07:40:56 AM
I would try without the Quix editor.

Jörgen
No. I turned off all extensions containing the word Quix completely, and the problem still exists. it will be something else. I guess I have to turn it off and keep trying.

Jörgen

Is the saved data in your VM/jommla html correct ? If it is, some jscript based cleaning is done when the code is put on your web.

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

marvays

I see everything in the administration as I wrote it down. Even if I save and reopen it, I always see it correctly. just an frontend it's different.

Jörgen

Then I guess that there is some plugin that tinkers with the code at time of rendering. Do You have some extension for rich snippets ?

Jörgen

Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

marvays

Yes. tassos.gr. . . but I've already tried to turn everything off. It did not help.

Jörgen

I have tried this in both product and category description. I can not see Your behaviour.
Have You cleared cache between tests ?

Fumbling in the dark here. Are You showing several categories on the same page ? All with the same code ?

Jörgen

Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

marvays

Hi. I am not understand you :(
All time I see my problem. You not?

sirius

#10
Hi

in this case use the meta, so just try like this:


...
<h3>Co je kutr?</h3>
<meta itemprop="name" content="Co je kutr?" />
...


but if possible it would be far better to implement your microdata in the template.

And if you do it in your html content, it could be more simple to put your data at the end with json, just allow it in jce settings.

Example for FAQ Page:
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "FAQPage",
      "mainEntity": [{
        "@type": "Question",
        "name": "What is the return policy?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Most unopened items in new condition and returned within <strong>90 days</strong> will receive a refund or exchange. Some items have a modified return policy noted on the receipt or packing slip. Items that are opened or damaged or do not have a receipt may be denied a refund or exchange. Items purchased online or in-store may be returned to any store.<br /><p>Online purchases may be returned via a major parcel carrier. <a href=http://example.com/returns> Click here </a> to initiate a return.</p>"
        }
      }, {
        "@type": "Question",
        "name": "How long does it take to process a refund?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "We will reimburse you for returned items in the same way you paid for them. For example, any amounts deducted from a gift card will be credited back to a gift card. For returns by mail, once we receive your return, we will process it within 4–5 business days. It may take up to 7 days after we process the return to reflect in your account, depending on your financial institution's processing time."
        }
      }, {
        "@type": "Question",
        "name": "What is the policy for late/non-delivery of items ordered online?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Our local teams work diligently to make sure that your order arrives on time, within our normaldelivery hours of 9AM to 8PM in the recipient's time zone. During  busy holiday periods like Christmas, Valentine's and Mother's Day, we may extend our delivery hours before 9AM and after 8PM to ensure that all gifts are delivered on time. If for any reason your gift does not arrive on time, our dedicated Customer Service agents will do everything they can to help successfully resolve your issue. <br/> <p><a href=https://example.com/orders/>Click here</a> to complete the form with your order-related question(s).</p>"
        }
      }, {
        "@type": "Question",
        "name": "When will my credit card be charged?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "We'll attempt to securely charge your credit card at the point of purchase online. If there's a problem, you'll be notified on the spot and prompted to use another card. Once we receive verification of sufficient funds, your payment will be completed and transferred securely to us. Your account will be charged in 24 to 48 hours."
        }
      }, {
        "@type": "Question",
        "name": "Will I be charged sales tax for online orders?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text":"Local and State sales tax will be collected if your recipient's mailing address is in: <ul><li>Arizona</li><li>California</li><li>Colorado</li></ul>"}
        }]
    }
    </script>
J3.10.12 | PHP 7.4.33 + APC + Opcode
VM Prod : 3.8.6 | VM Test : 4.4.0.11095

pinochico

#11
To sirius:

Quoteit would be far better to implement your microdata in the template

It not possible, because this html is putted in category description as "fejk".
Then not all category description have to the same rich snippets for FAQ and all info about rich snippets for every VM category are dynamic == right info is only in category description after putted by admin - sometime yes, sometime no.

And if use json, then admin must be high level speshitpillt and undestand how put it this json to category description and duplicated his work too (is time expensive).


Problem is only this:

for "h3" - clear meta mark
for "p" - not clear meta mark

Maybe problem is inside definition about category description in mysql or in PHP file - first check model for category and second function for save infromation about category and third check mysql definition for category description (in language table too!)
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

sirius

#12
i just tell the solution for his particular case

as I said the <meta can do the job

but if you put microdata in your html content, obviously it become time expensive to maintain as it's not dynamic at all...it's a choice.

So in this case just use Google Structured Data Pro extension very convenient
And with this one (that I use on some sites) you will be able to put json/faq on virtuemart categories of your choice dynamically.
Just choose between automatic and manual mode.

With automatic it detects css selectors, so you just have to put the right selector in your html, so data are applied dynamically.


Then you just choose the VM categories that need this one


Jobe done, fire and forget

Or use manual mode then you can put the whole json code directly.
J3.10.12 | PHP 7.4.33 + APC + Opcode
VM Prod : 3.8.6 | VM Test : 4.4.0.11095

pinochico

to sirius:

Im very sceptic, because the extensions from tassos for VM category add rich snippets for category shop and not both - for FAQ and for VM category, isn't it?

For me the best option is find bug and fixed or the last option add json at the end html for category description.
Or (and now Im thinking about this) put articles into category description by articles anywhare?
But the basic question is why putted FAQ rich sbippets into category description (will there be any benefit?).

Finally we use other solution for shop category with faq in our shop - add our modul with all type faq articles conected to right category (yes, some little custom developing).
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products