Kunena 7.0.4 Released

The Kunena team has announce the arrival of Kunena 7.0.4 [K 7.0.4] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0

Question Cannot display forum | _has_rights() error

More
16 years 11 months ago #16723 by tinny
Hi everybody.

I am moving an entire site from WP+IPB to Joomla+Kunena.

Everything on my local host has been done nearly seamless, importing IPB forum to PHPBB3 and then to kunena, exporting articles from WP to Joomla.

I'am stuck with this error on Kunena, once I uploaded online all files and imported the jos_fb tables
Code:
Fatal error: Non-static method CKunenaTools::_has_rights() cannot be called statically in /components/com_kunena/class.kunena.php on line 836

I found someone with same problem here on the past but even though I tried all every solution purposed, the error is still there.
I tried to change security settings, to synchronize users, to re-import the jos_users table..
I'm having this error with both Kunena 1.0.9 and the 1.0.10 too, once upgraded.

Any idea?

Thanks :)

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

More
16 years 11 months ago - 16 years 11 months ago #16724 by xillibit

I don't provide support by PM, because this can be useful for someone else.
Last edit: 16 years 11 months ago by xillibit.

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

More
16 years 11 months ago - 16 years 11 months ago #16729 by tinny
xillibit wrote:

Hello,

do you have read this : www.kunena.com/forum?func=view&id=16486&catid=105#16486


thank you for your reply.

yes, i have read it.. it's that it just don't work? have I to set open permissions to everyone? :huh:

I'll try the hack indicated in that topic, if it's good for 1.0.10
Last edit: 16 years 11 months ago by tinny.

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

More
16 years 11 months ago #16780 by tinny
It's a primary issue for me, I have my site down and everything is ok except this...

Any help would be very very appreciated :(

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

More
16 years 11 months ago - 16 years 11 months ago #17296 by Matias
Which php version do you have?

This seems to be php compability problem and I believe I've found a fix for it:

In components/com_kunena/class.kunena.php replace lines 811-842
Code:
function getAllowedForums($uid = 0, $gid = 0, &$acl) { global $database; function _has_rights(&$acl, $gid, $access, $recurse) { if ($gid == $access) return 1; if ($recurse) { $childs = $acl->get_group_children($access, 'ARO', 'RECURSE'); return (is_array($childs) and in_array($gid, $childs)); } return 0; } [... more code in here ...] return $catlist; }

with this:

Code:
function _has_rights(&$acl, $gid, $access, $recurse) { if ($gid == $access) return 1; if ($recurse) { $childs = $acl->get_group_children($access, 'ARO', 'RECURSE'); return (is_array($childs) and in_array($gid, $childs)); } return 0; } function getAllowedForums($uid = 0, $gid = 0, &$acl) { global $database; $catlist = ''; $query = "SELECT c.id,c.pub_access,c.pub_recurse,c.admin_access,c.admin_recurse,c.moderated" . ",(m.userid IS NOT NULL) AS ismod FROM #__fb_categories c" . " LEFT JOIN #__fb_moderation m ON c.id=m.catid AND m.userid=" . (int)$uid . " WHERE published=1"; $database->setQuery($query); $rows = $database->loadObjectList(); check_dberror("Unable to load category list."); if ($rows) { foreach($rows as $row) { if (($row->moderated and $row->ismod) or ($row->pub_access == 0) or ($row->pub_access == -1 and $uid > 0) or ($row->pub_access > 0 and CKunenaTools::_has_rights($acl, $gid, $row->pub_access, $row->pub_recurse)) or ($row->admin_access > 0 and CKunenaTools::_has_rights($acl, $gid, $row->admin_access, $row->admin_recurse)) ) $catlist .= (($catlist == '')?'':',').$row->id; } } return $catlist; }

Did it work?
Last edit: 16 years 11 months ago by Matias.

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

More
16 years 10 months ago #18811 by xillibit
Hello,

tinny do you have fixed this problem or not ?

I don't provide support by PM, because this can be useful for someone else.

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

Time to create page: 0.224 seconds