Why is my Meta Description missing words?

Hello,



I would like cs-cart to pull the meta description from my product description. For some reason it is not doing it correctly, it is not including all the words and it reads as if my description has been put through a spinner or something.



How can I fix this bug?



Thanks!

Search engines truncate meta discriptions which are longer than 160 characters. Is cs-cart imposing this same limit?

[quote name='DBN' timestamp='1318952656' post='123951']

Search engines truncate meta discriptions which are longer than 160 characters. Is cs-cart imposing this same limit?

[/quote]



I do not think so. If that was the case then they would simply remove the text after the 160 mark. Instead, it is randomly removing words so it does not even read correctly.



This will be horrible for my click through rate if left this way. I could manually change it, but I have over 500 products…



Most shopping carts have an option to take product description and use it as the meta description if nothing is entered into the meta description field.



cs-cart seems to have the right idea, but for some reason it is not working correctly…



Here is a live store as shown on the “customers” section of the cs-cart website.



http://www.ambientlounge.co.uk/conversion-lounger-bean-bag.html



They too have the same bug. Compare the meta description as shown in the page source with the product description.

Strange, this is working fine in my shops. Maybe it's a known bug in a specific version? Did you check the bug tracker?

Guessing at this without comparative example is a tough way to go.

Please provide the meta data (or link to page) and the description from your product details page. We might then be able to give at least an educated guess.

Hello tbirseth,



You can see in the link I gave in my previous message above.



Look at their product desc, then look at the meta. It is missing words.





I am using the latest 2.2.3 version while the site above is using 2.1.0



Now that I am looking at it, it seems that this bug removes any words that are 3 characters or less from the meta description.





Here is another example on version 2.1.4



http://www.babyauthority.com/furniture/rockers/perch-stool.html



One on 2.0.13



http://guam.ro/index.php?dispatch=products.view&product_id=29787









@flow did you check closely?



It seems to only remove 3 letter or below words.







This is indeed very strange that no one has spotted this yet…





I bet click-through rates are pretty low on a lot of cs-cart stores that are relying on the meta description to be pulled from the product description.






[quote name='tbirnseth' timestamp='1318963727' post='123978']

Guessing at this without comparative example is a tough way to go.

Please provide the meta data (or link to page) and the description from your product details page. We might then be able to give at least an educated guess.

[/quote]

[quote name='Flow' timestamp='1318955367' post='123957']

Strange, this is working fine in my shops. Maybe it's a known bug in a specific version? Did you check the bug tracker?

[/quote]







Did you enter your meta descriptions manually?

I don't see this on my site either… Have you had custom work done? I can see where that could be useful for auto-generating the meta-keywords, but shouldn't be applied to the description. You might want to compare files in your core directory with what was distributed for the version you are running.

No, no custom changes. How would I go about checking the core files? Just check the file size?

I have the same issue on my category meta desc, didnt notice it until seeing this thread. Seems to be in words of 3 characters or less including commas.



John

I'd submit it as a bug in bugtracker. I don't have time to research it. I'm guessing this is on the meta-description where it is auto-generated versus being part of the category data on the category detail page. Sounds like the might have inadvertently used the same function for setting the description as for auto-generating meta-keywords which probably should exclude those words.

[quote name='Billlee' timestamp='1318987132' post='124006']

Did you enter your meta descriptions manually?

[/quote]



Hmm, I thought I had a lot of empty meta descriptions but apparently my colleague is more fanatic then I thought. They are all filled out.



Gotta give her a kiss now.

[quote name=‘Flow’ timestamp=‘1319445922’ post=‘124431’]

Hmm, I thought I had a lot of empty meta descriptions but apparently my colleague is more fanatic then I thought. They are all filled out.



Gotta give her a kiss now.

[/quote]

One of the canonical addon’s benefits is that it will use your category name as meta description/keywords if your meta description/keywords is empty. ;)

this is not a bug its flaw design…



core/fn.common.php



function fn_generate_meta_description($html, $max_words = 60)

{

$meta = array();

if (!empty($html)) {

$html = str_replace(' ', ' ', $html);

$html = str_replace(array(“\r\n”, “\n”, “\r”), ' ', html_entity_decode(trim($html), ENT_QUOTES, 'UTF-8'));

$html = preg_replace('//i', " “, $html);

$html = strip_tags($html);

$html = str_replace(array('.', ',', ':', ';', '`', '”', '~', ''', '(', ')'), ' ', $html);

$html = preg_replace('/\s+/', ' ', $html);

$html = explode(' ', $html);

foreach ($html as $k => $v) {

[color=#b22222] if (fn_strlen($v) > 3) {

$meta[] = $v;

}
[/color]

remove the red part and it will show all, they really suck at making things then saying its a bug…give me access to your box ill change ;)



actually make the red part only



[color=#b22222]$meta[] = $v;[/color]



[color=#B22222]$v represents the word part… so it will add it… you can filter on v if you need[/color]



they did that way because they coudnt trim to 160 chars which is largest meta des for SE’s

so they said cut words under 3 chars, and add … ;)