Joomla's robots settings ignored

More
10 years 9 months ago - 10 years 9 months ago #49024 by leonel.oliveira
Hello,

It seams that flexicontent is ignoring joomla's "robots" setting in global configuration, I have it set as "noindex, nofollow", but when i view source the meta tag is not present.

I have a menu item set as Flexicontent single item, the article "robots" is set to "use global".

Please check if there is an issue here.
Last edit: 10 years 9 months ago by leonel.oliveira.

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #49026 by ggppdk
Hello

please always mention the FLEXIcontent version and revision


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago - 10 years 9 months ago #49027 by leonel.oliveira
Joomla version 3.3.3
Flexicontent version 2.2.0 r1932.
Last edit: 10 years 9 months ago by leonel.oliveira.

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #49028 by ggppdk
Hello

the menu configuration should be used if current menu item "matches"
Code:
// Overwrite with menu META data if menu matched if (FLEXI_J16GE) { if ($menu_matches) { if (($_mp=$menu->params->get('menu-meta_description'))) $document->setDescription( $_mp ); if (($_mp=$menu->params->get('menu-meta_keywords'))) $document->setMetadata('keywords', $_mp); if (($_mp=$menu->params->get('robots'))) $document->setMetadata('robots', $_mp); if (($_mp=$menu->params->get('secure'))) $document->setMetadata('secure', $_mp); } }

the above code is inside the file:

components/com_flexicontent/views/item/view.html.php


you can see that this line should effect the robots:
Code:
if (($_mp=$menu->params->get('robots'))) $document->setMetadata('robots', $_mp);

but indeed it only uses menu item setting and not global setting,

since it seems that $document object returned by Joomla helper function does not set the Global setting, it is left to be done by the component ...

we should use Joomla Global setting or add such a setting as a new FLEXIcontent component parameter


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #49029 by leonel.oliveira
Yes, please do.

It would be extreamlly time consuming on big sites that majorly use flexicontent having to set the "robots" setting for each menu item.

I suggest something like:
Code:
// Set remaining META keys $mdata = $item->metadata->toArray(); foreach ($mdata as $k => $v) { if ($v) $document->setMetadata($k, $v); else if ($k == "robots") $document->setMetadata($k, $app->getCfg($k)); }

Thanks.

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #49035 by ggppdk
Hello

will add this or similar code in upcoming revisions

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.303 seconds
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save