VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: FrankHF on October 02, 2023, 18:50:34 PM

Title: Google wont index because its unable to parse }
Post by: FrankHF on October 02, 2023, 18:50:34 PM
Hi,

Using VM4.2.0:

We just put our new site online and are having google keep running the indexing. The URL's are fine, however google is angry at us for the following:

Quote
Parseerfout: '}' of naam van objectlid ontbreekt
Items met deze problemen zijn ongeldig. Ongeldige items komen niet in aanmerking voor uitgebreide resultaten van Google Zoeken.

Which is roughly translated to:

QuoteParsing error: '}' or name of object member is missing
Items with these problems are invalid. Invalid items wont be taken into consideration for extensive results in GOogle Search
.

Now,

Google is so kind to provide us with some of the code, and it seems to come from snippets.php located in components/com_virtuemart/sublayouts. Google points us towards part of the code.

We removed the comma behind     "url": "<?php  echo $canonicalUrl; ?>" in line 165. But that also causes the manufacturers not to be displayed anymore.

Has anyone seen this before? In VM 3.9 we did not see this, but the same line also has a comma in the same file.

How can we make both google happy and show the manufacturers?

Thanks for your consideration.
Title: Re: Google wont index because its unable to parse }
Post by: Milbo on October 16, 2023, 19:34:05 PM
I think that is fixed in the higher membership version.
This is the current and imho working code

    "url": "<?php  echo $canonicalUrl?>"
<?php if ($priceUntil) { ?>
    ,"priceValidUntil": "<?php  echo $priceUntil?>"
<?php }
if(strlen($extra)){
echo ','.$extra;
}
Title: Re: Google wont index because its unable to parse }
Post by: smithloo on April 02, 2024, 10:27:10 AM
you need carefully check sitemap.xml and robot.txt