Universal FC Module, menu item in SEF item links

More
10 years 8 months ago #49485 by leonel.oliveira
Hello,

On my main menu I have a link to an article. I retrieve the same article in the universal fc module, I have "show readmore" activated and "Force menu item" is set to "No", the generated link isn't placing "Itemid=" in the url and should.

In helper.php:
Code:
$lists[$ord]['standard'][$i]->link = JRoute::_(FlexicontentHelperRoute::getItemRoute($row->slug, $row->categoryslug, $forced_itemid, $row).(($method_curlang == 1) ? "&lang=".substr($row->language ,0,2) : ""));

Consulting the getItemRoute method, it tires to find if any menu item has a link to the article.
Code:
if ($menuitem = FlexicontentHelperRoute::_findItem($needles)) { $link .= '&Itemid='.$menuitem->id; return $link; }

I found that removing the "$row" parameter it generated the proper link with the correct Itemid.

if "$row" is passed in the getItemRoute method, then in route.php
Code:
// These will be unset and not used needles lookup loop $needles['_item'] = $item;

I'm not sure if "$row" is really needed.
Please check if there is an issue here.


I'm using Joomla 3.3.3 and FLEXIcontent version 2.2.0 r1932.

Update:
Just a note, on my site I have multi language support, if I disable the System - Language Filter plugin, the link is properly generated. I'm also using falang.

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

More
10 years 8 months ago #49486 by ggppdk
Hello

thank you for your works
and for the details
indeed this is a bug, but it is was fixed recently,
it causes language ALL menu items not be tried,

but this is only 1 thing of the SEF related work done recently:

r1959
# Fixed route.php (selects menu item for SEF urls) to
(a) # properly handle/include menu items of language ALL (your reported bug)
ALSO current language and ALL language now are in the same lookup table
(b) # use parent category menu items in category URLs, (c) # prefer current category menu item in items URLs that have multi menu items for their categories,
(d) ^ (change) allowed menu item that override category configuration to be matched

r1958
# Improved/fixed SEF url creation (route.php) to handle content languages that do have an "active" interface language (active = having lang files, having home page menu item, and being of accessible access level for current user), the language SEF CODE (lang variable) will not be added to the URL, also now respecting parameter of Joomla language filter plugin about removing lang variable from the URL,

r1957
# Clean-ups for router.php (SEF URL segment creation and parsing (interpretation of SEF URLs)) also fixed some case of unneeded variables in urls
e.g. ?view=item

you may get these files, to test new changes:

components/com_flexicontent/helpers/route.php
- finds menu item (ID) to use in SEF URLs

components/com_flexicontent/router.php
- create the SEF URLs, (the non menu-item-alias segment)
- interprets the SEF URLs, (the non menu-item-alias segments)


-- 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 8 months ago #49491 by leonel.oliveira
Thanks. :D Keep up the good work!

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.740 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