VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: milstan on October 10, 2011, 13:25:31 PM

Title: [solved & fixed]VirtueMart Categories Layout: Empty Title tag
Post by: milstan on October 10, 2011, 13:25:31 PM
2.0.0-RC-2H:

Menu item type VirtueMart ยป VirtueMart Categories Layout. No matter what I write in Page Display Options > Browser Page Title, the title tag on that page is empty.

<title></title>
Title: Re: VirtueMart Categories Layout: Empty Title tag
Post by: Awerso on October 11, 2011, 15:38:33 PM
same bug here.
Title: Re: VirtueMart Categories Layout: Empty Title tag
Post by: jjk on October 11, 2011, 16:14:38 PM
That's not a bug. Probably you guys forgot to select the correct category under 'Required Settings' - 'Select a category' (your VirtueMart category) on the same page where you try to enter a title in the 'Page display options'. Once you have done this, the title tag for the VM2 category will be generated. However, if you try to enter a page title in the 'Page display options' anyway, it will have no effect, because it doesn't make sense to have two different page titles in the page source code (unless you want to confuse the search engines).  ;)
Title: Re: VirtueMart Categories Layout: Empty Title tag
Post by: milstan on October 11, 2011, 16:20:30 PM
When for Select a Category drop-down I select "Top Level Category", the title tag is empty. Where do we enter title of the top level category?

I guess when "Top Level Category" is selected, the title tag should be store name. But it's not case. It's empty.
Title: Re: VirtueMart Categories Layout: Empty Title tag
Post by: jjk on October 11, 2011, 17:16:49 PM
I'm not shure if it makes sense to have a title tag for the 'VirtueMart Categories Layout' layout makes sense, since it is basically just a "Menu with Images" providing the links to individual categories. If you assign 'VirtueMart Category Layout' (i.e a single category named "Books") to a menu item, you should select "Books" from the category dropdown. Besides generating the "Books" title for you, it also determines which category layout will be loaded, which is important if you customize your category layouts.

If you think the 'Top Level Category' should show the store name, you may post that as a feature request.
Title: Re: VirtueMart Categories Layout: Empty Title tag
Post by: milstan on October 11, 2011, 17:20:09 PM
Of course it should not be empty, it was not empty in VM 1.1. Whenever you make software that creates any page with empty title tag, this should fixed.

BTW, list of categories page is very useful as it shows all features of your store (root category).
Title: Re: VirtueMart Categories Layout: Empty Title tag
Post by: jjk on October 11, 2011, 17:58:22 PM
I just noticed that "Electrocity" has fixed/added the missing title tag to the SVN trunk a few minutes ago. So the store name will be included in the next update.  ;)
Title: Re: VirtueMart Categories Layout: Empty Title tag
Post by: milstan on October 11, 2011, 18:07:39 PM
Good news! :)
Title: Re: [solved & fixed]VirtueMart Categories Layout: Empty Title tag
Post by: Studio 42 on October 11, 2011, 20:21:11 PM
Hi all,
Added to SVN code !
now you have <title>YOUJOOMLAPAGETITLE</title>
and <meta content="YOUJOOMLAPAGETITLE" name="title">

Patrick
Title: Re: VirtueMart Categories Layout: Empty Title tag
Post by: cas on December 27, 2011, 00:44:21 AM
It works for VirtueMart Categories Layout, but not for VirtueMart Category Layout.   I have "Top Level Category" selected.   The Browser Page Title is blank.   I'm using VM2.0.0
Check it out here: https://www.hairextensionsfair.com/shop
Title: Re: VirtueMart Categories Layout: Empty Title tag
Post by: cas on February 05, 2012, 00:35:58 AM
This is NOT Solved.  Just updated to VM2.0.1.d and this still does not work for VirtueMart Default Layout and VirtueMart Category Layout.  When I enter something in the menu Page Display Options > Browser Page Title, it does not display as the website browser page title. 
Title: Re: [solved & fixed]VirtueMart Categories Layout: Empty Title tag
Post by: cas on February 16, 2012, 07:28:55 AM
Updated to VM2.0.1.K and this still does not work.
Title: Re: [solved & fixed]VirtueMart Categories Layout: Empty Title tag
Post by: cas on July 17, 2012, 02:01:40 AM
Updated to VM2.0.6 and this still does not work for VirtueMart Default Layout and VirtueMart Category Layout.  When I enter something in the menu Page Display Options > Browser Page Title, it does not display as the website browser page title. 
Title: Re: [solved & fixed]VirtueMart Categories Layout: Empty Title tag
Post by: Axis on October 29, 2012, 12:28:49 PM
I had the same problem, with a menu item of type "VirtueMart Categories Layout".
The menu item opens a category with 3 sub-categories and my title page was the category name.

I went to: components\com_virtuemart\views\categories\view.html.php

and changed the code from this:
if ($category->category_name) $document->setTitle($category->category_name);
to this:
if ($category->customtitle) $document->setTitle($category->customtitle);

and it worked fine.

Hope i helped

George.
Title: Re: VirtueMart Categories Layout: Empty Title tag
Post by: cas on April 20, 2013, 21:04:06 PM
Updated to VM2.0.20b and it still does not work for VirtueMart Category Layout.  When I enter something in the menu Page Display Options > Browser Page Title, it does not display as the website browser page title. 
Title: Re: [solved & fixed]VirtueMart Categories Layout: Empty Title tag
Post by: jjk on April 20, 2013, 22:14:53 PM
Use the 'Custom Page Title' in your VM 'Category Edit' view instead. That one works.
Title: Re: [solved & fixed]VirtueMart Categories Layout: Empty Title tag
Post by: cas on April 20, 2013, 22:34:25 PM
Maybe I don't understand what you mean, but I am referring to the Top Level Category of VM that is assigned to the shop menu item.  Where besides the Joomla Menu admin can I change the Page Title for the top level category in VM? 
Title: Re: [solved & fixed]VirtueMart Categories Layout: Empty Title tag
Post by: jjk on April 21, 2013, 07:31:27 AM
Quote from: cas on April 20, 2013, 22:34:25 PM
Maybe I don't understand what you mean, ...

Maybe I don't understand what you want.  ;)
If I understand you correctly, you want a custom category title in the browser tab. You can set that directly in the VM category settings. Near the bottom of the form there is a field labled 'Custom Page Title'. This field is also available in the product settings form, so you can set a custom page title for each product.
Title: Re: [solved & fixed]VirtueMart Categories Layout: Empty Title tag
Post by: cas on April 21, 2013, 08:49:05 AM
Hi JJK,

Take a look at the attached screenshot.  In the upper part of the image you can see the admin for the VM menu item Furniture and the Browser Page Title is set to "Palliser Leather Furniture", but in the lower part of the image, you can see the website browser page title has "Furniture", which is the name of the VM menu item.  I hope the screenshot clears up the confusion and shows the problem.

[attachment cleanup by admin]
Title: Re: [solved & fixed]VirtueMart Categories Layout: Empty Title tag
Post by: jjk on April 22, 2013, 09:02:06 AM
Like I said above already - just type "Palliser Leather Furniture" into the 'Custom Page Title' field of your VM 'Products > Product Categories > Furniture" Product Category  Form settings and click on 'Save'. It's the first field in the 'Meta Information' section of this view. Afterwards your browser tab will show "Palliser Leather Furniture" instead of "Furniture" while the menu item in your horizontal menu will still display "Furniture".
Title: Re: [solved & fixed]VirtueMart Categories Layout: Empty Title tag
Post by: cas on April 22, 2013, 09:20:26 AM
Hi JJK,

I don't have a product category called Furniture.  That's the menu item called Furniture, which points to the VM Category Layout, so it displays all the categories.  I know how to set the Browser Page Title for VM categories, and that works just fine, but Furniture is a menu item.   Can you fix the menu item for Category Layout?  This is a common issue in many extensions.  I have reported it to extension developers more times than I can remember, and fortunately they all fixed it. 
Title: Re: [solved & fixed]VirtueMart Categories Layout: Empty Title tag
Post by: Milbo on April 22, 2013, 10:48:21 AM
So you want to change the Page title for the page showing all categories? Hmm interesting, because internal it is just calling the category view categoryid=0
Title: Re: [solved & fixed]VirtueMart Categories Layout: Empty Title tag
Post by: cas on April 24, 2013, 06:53:31 AM
No, I just want it to work the normal way it works for all Joomla menu items.   In the admin for menus, the "Browser Page Title" can be set to whatever we want.  It's set in the Menu Manager > Page Display Options > Browser Page Title.   It works properly for all menu items, except the VM menu item.  I am using menu item type: "Category Layout".  Just look at the attached screenshot above to see what I entered in the admin for the Browser Page Title, and then what displays on the website at the top. 

Like I said earlier, this is a common bug for extensions to not display the Browser Page Title properly, but once I report it to the developer, they fix it to work properly. 
Title: Re: [solved & fixed]VirtueMart Categories Layout: Empty Title tag
Post by: franzpeter on April 24, 2013, 11:25:29 AM
@cas,
the vm categories layout has another problem too.
If linking categories and subcategories into the Joomla main menu it works as long as not using VM categories in the joomla menu with a non existing category inside the  Joomla menu. For example: We have 4 main categories: cameras, furniture, women, men. We create a Joomla main menu, with those four categories so it looks like: Cameras | Furniture | Women | Men and we create links for that four categories choosing VM categories link. Than we create subcategories like digital camera, analog camera within  the Cameras category choosing VM category (not VM categories) for linking. We create subcategories for the Furniture category like chair, table a.s.o. choosing VM category. We decide to add an additional subcategory to the Cameras for example and do use the VM backend, creating a category like mobile phone as another subcategory but do not create a Joomla menu link. It may be a bad example but that could happen for example while importing a lot of categories as subcategories with CSVI or CSVA. So those subcategories are now inside the VM database and the VM category structure but still not linked into the Joomla menu category structure. Those categories get shown by clicking on the main category menu entry for example Cameras. Doing so shows the newly created subcategories because Cameras is linked as VM categories page. If clicking - in the example - on mobile phone - it tries to shows all products. Sometimes that may produce server errors, if crawler try to do so.  All the other subcategories still work, because they are linked inside the menu structure, not so the mobile phone.
Obviously there is a problem when linking with VM categories and than creating a new category in the VM Backend without creating an additional link inside the Joomla menu structure. I do not exactly know why that happens but maybe it has something to do with the way, how VM categories work. Could it be that the subcategories from Virtuemart have a different linking method, maybe a different encoded url (& instead of the Joomla way: &amp; for example). Did see that because I am using such an import tool, which creates categories and products inside VM database, but of course, those categories are still not linked as Joomla menu item after importing.
For now the best way seems to be not using VM categories to link the main categories, instead, -to keep the sef urls-, creating those menu entries only as separators.

If you would like to add custom title and metadescription, the only way, if you want to use the vm categories layout to show the top level category as clickable item, is to use EFSEO - Easy Frontend SEO extension.
@Milbo,
as described in my post what you say with: because internal it is just calling the category view categoryid=0 seems to be very buggy. If using Joomla menu to link top level categories with there subcategories in a Joomla menu, we use vm categories layout for the top level category and vm category layout for the sublevel categories. That dpes not work if there is a published sublevel category in Virtuemart but not in Joomla menu. Result is, that a page is displayed which shows all products of the shop. So the vm categories layout may show more categories than the Joomla menu. Result is a total mess. If a crawler tries to access such a non Joomla only VM category in most cases it produces a server error, because it takes too much time to show all products. And if it should work, you may have a lot of products with very wrong url in the crawler pages.

For now the best way is to avoid using vm categories layout together with vm category layout. To keep the sef structure intact, best way is to use a separator for the top level category with exactly the same name as defined in VM backend and add the sublevel categories defined as vm category layout. So it is not necessary too, to define meta description a.s.o. for the top level category, because it is not a selectable link. It is only used as separator to keep sef path.

By the way, the vm categories layout has a bug or some undefined conditions, where it tries to show all products and not all categories.
Title: Re: VirtueMart Categories Layout: Empty Title tag
Post by: cas on June 13, 2013, 21:37:32 PM
I reported this in Dec 2011 and it still does not work!  Please fix this!

It does not display the Browser Page Title on the frontend website that I set in the admin:  Menu Manager > Page Display Options > Browser Page Title.   It works properly for all menu items, except the VM menu item for menu item type: "Category Layout".