1 (edited by 2015-04-13 07:52:43)

Topic: cn_get_categories(); different browsers different output

Hello supportTeam,

with this code i try to list all categories:

include ('cutenews/core/init.php');
$categoryes= cn_get_categories();
print_r($categoryes);

chrome 41.0 output:

Array ( [1] => Array ( [name] => preise [memo] => Preise [icon] => [acl] => [parent] => 0 [level] => 0 [ac] => Array ( [0] => 13 [1] => 14 ) )..........


count($categoryes) output:12

with Safari / Firefox the output:

array()


count($categoryes) output:0

i do not unterstand why?

2 (edited by 2015-04-22 13:52:05)

Re: cn_get_categories(); different browsers different output

Try using this code.

include ('cutenews / core / init.php');
$Categories = cn_get_categories (true);
print_r ($categories);

cn_get_categories () is the function of a core, and therefore by default in the implicit argument display of the listing category depends on the level of user access. In this case, you might be logged in with Chrome, but not with Safari / Firefox.

Best regards,
CN Support team

Re: cn_get_categories(); different browsers different output

Try using this code.

include ('cutenews / core / init.php');
$Categories = cn_get_categories (true);
print_r ($categories);

cn_get_categories () is the function of a core, and therefore by default in the implicit argument display of the listing category depends on the level of user access. In this case, you might be logged in with Chrome, but not with Safari / Firefox.


Hello supportTeam,

thank you for the solution!

now i'm able to create a dynamic navigation.

https://cutephp.com/forum/style_emoticons/default/rolleyes.gif