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

More
11 years 10 months ago #46334 by mcmurdok
I tried to access to some category parameters in the item-view ($this->item->params) to decide to show or not to show the JComments depending on the category preferences.

All is fine in php 5.3.2 so I got the right values from the category-parameters and the additional individual template parameters (I created a template "standard" with some additional values, e.g "show_comment_count").

In php 5.4.26 I got completely different values. The [clayout] is now "blog" instead of the correct [clayout] => standard. That's why I can't get access to my own template value "show_comment_count".

Maybe the merging function behaves different?

Regards
McMurdok


flexicontent version 2.1.2 r1806 beta
php 5.3.2 / php 5.4.26
Joomla! 2.5.16

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

More
11 years 10 months ago #46335 by micker
at first beta 1806 is very old ...
update this
code.google.com/p/flexicontent/d ... p&can=2&q=
and retest

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
11 years 10 months ago #46336 by mcmurdok
I just updated flexicontent to r1824 and it's the same strange behavior.

You can test it in item-view:
1. assign an item to only one category.
2. add
Code:
echo $this->item->params->get('clayout')
into item.php of the items template
3. You should now see the name of the template assigned to the category (and all it's parameters) in item-view

It's fine on local PHP 5.3
But on the server with PHP 5.4 I always get the template parameters of "blog" I never assigned to any category or item

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

More
11 years 9 months ago #46351 by ggppdk
Hello

does this effect occur with other parameters too ?


-- 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 review. Thanks!

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

More
11 years 9 months ago #46356 by mcmurdok
Hello,
yes this effect occurs to all parameters I assigened to a category and which I want to access from item-view.
Also self-generated parameters don't appear, because it seems to use parameters of the wrong template ("blog")

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

More
11 years 9 months ago #46357 by ggppdk
Hello


please send me a PM with super admin login and site URL and provide an example to reproduce/view this effect


-- 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 review. Thanks!

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

More
11 years 9 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 review. Thanks!

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

More
11 years 9 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 review. Thanks!

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

More
11 years 9 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 9 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 review. Thanks!

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

Moderators: vistamediajoomlacornerggppdk
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