Using Meta Tags with UberCart

Uncategorized

Using Meta Tags with UberCart

by Sean Corrales
//

UberCart and Meta Tags (aka Nodewords) are two big modules in the Drupal community that don’t always play nice together. If you have both these modules enabled on your site and are getting a blank page when viewing products, here’s some tips to get your site running again.

The problem arises from Meta Tags trying to automatically generate a description from a teaser when you don’t explicitly set a meta description. The teaser for an UberCart product is poison for the Meta tags module; the meta tags module is called before UberCart can load it’s functions. This causes the page to error out when it can’t find the function uc_price().

If you have a site that skews mostly towards products with very little content pages, then you should go Content Management > Meta Tags and uncheck the “Use the teaser of the page if the meta description is not set.” option. The downside here is you will now be responsible for entering descriptions for all your pages instead of letting Meta Tags handle it automatically.

The solution above is the only one I found when I was battling this issue. But what if you have a site with only a few products and several pages of content? You’d have to manually create, and update, your descriptions. Doesn’t sound like a lot of fun, does it?

If you want to keep generating meta descriptions from teasers, and not have broken product pages, the solution is very simple: manually enter descriptions for each product. This prevents Meta Tags from attempting to load the teaser and giving you the white screen of death.

 

More About the Author

Sean Corrales

Lead Web Developer
Internet Explorer ignoring CSS files Like most web developers, I do most of my development work in one browser (in my case, Firefox) and then do cross browser checks after ...
Creating checkout panes for Ubercart All code comes from a shipping insurance module I wrote for Ubercart. I plan to release it on ubercart.org and drupal.org after I ...

See more from this author →

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK

×

Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Germany
Geschäftsführer: Mel Stephenson

Kontaktaufnahme: markus@interworks.eu
Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072

×

Love our blog? You should see our emails. Sign up for our newsletter!