Different merging of parameters PHP5.3 vs. PHP5.4?

More
11 years 2 months ago #46365 by ggppdk
Hello

please backup or test in a copy site:
-- i don't think it should make a difference, but the new version also adds a "debug" parameter to report heritage order: it is in:

Component parameters/
/Content Display TAB/
/Category View Section/
/Parameters: Category Info & Options/
- Inherit parameters from
- Debug parameter heritage


FLEXIcontent v2.2.0 r1882 beta


-- 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
11 years 2 months ago #46376 by ggppdk
Hello

there is no parameter heritage for clayout (it is a category parameter that does not have "use global"), where is it supposed to inherit from ?

from another category ?


-- 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
11 years 2 months ago #46377 by mcmurdok
Thank you, with
Code:
$cid = (int)JRequest::getVar('cid'); $cid = $cid ? $cid : $this->item->catid; $category = JCategories::getInstance('Content')->get($cid); echo '<pre>';print_r($category->getParams()->get('clayout'));echo '</pre>';
I've access to all parameters from the category the item belongs to. E.g. 'clayout' or any additional individual parameter e.g. 'show_comments_count'

For whatever reason I got the correct values with
Code:
echo '<pre>';print_r($this->item->params);echo '</pre>';
in PHP 5.3 but not in PHP 5.4

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

More
11 years 2 months ago #46380 by ggppdk
Hello

you are not supposed to get parameters like this:

...
$category = JCategories::getInstance('Content')->get($cid);
$category = ($category->getParams()->get('clayout'));

the above does not do ANY parameter heritage and if does it will not inherit from FLEXIcontent component (up to v2.1.2) or from parent categories (v2.2.0+) or from specific category (v2.1.3/v2.2.0)

instead use already calculated:

$this->params

in both category view and in item view


-- 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.703 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