HREF LANG Tag not working

  • office@it-web.at
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 1
  • Thank you received: 0

office@it-web.at created the topic: HREF LANG Tag not working

Hi guys,

I'm currently working on a multilingual website containing breezingforms. Due to SEO we recognized that the HREFLANG tag ain't show up correctly in the source code on a breezingforms menu item.

For example - these two breezingforms pages are associated (DE = Kontakt, EN = Contact):
www.ifm.ac.at/en/contact/
www.ifm.ac.at/de/kontakt
If you have a look at the source code, there is no HREFLANG tag.

If you check out these two article pages which are also associated (DE = Über uns, EN = IFM in Profile)
www.ifm.ac.at/de/ueber-ifm/
www.ifm.ac.at/en/ifm-in-profile/
you will see that the HREFLAN tag is set correctly.

So I analysed the code of the plg_languagefilter plugin and found two things which I'm not sure about if they are correctly implemented in the breezingforms component:

From Line 766 to 769
766: if ($active_link === $current_link)
767: {
768: 	$associations = MenusHelper::getAssociations($active->id);
769: }
Here the plugin tries to load the associations of the menu item.
But when I check the two vars $active_link and $current_link I get the following:
$active_link = /en/contact/view/form/lang/en-GB
$current_link = /en/contact/lang/en-GB
So it never comes to execution of line 768 - which is important for the next step.

From Line 792 to 828 there is this big switch where the plugin decides which link it is.
The following case is never reached because of the problem I mentioned already:
case (isset($associations[$i]) && ($item = $menu->getItem($associations[$i]))):

And this case is never reached because there is no BreezingformsHelperAssociation class in the breezingforms component:
case (isset($cassociations[$i])):

So it comes to this case:
default:
$doc->addCustomTag('<link href="bad '.$language->sef.'" />');
unset($languages[$i]);
where the language is unset.

Because of these two problems (I think) there is no HREFLANG tag.

Maybe I got completely wrong but I think this should be fixed in the BF component.
Would you please have a look at this problem.
It's important for us to have the correct HREFLANG tag.

Thanks,
Thomas
#235641
Moderators: ForumSupporttomeperica
Time to create page: 0.056 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here