Hi!
My site is under development and it was going ok but now I can't get access to the Jomsocial admin interface at all. 500 Internal error. I can normally get access to other components by admin side, only Jomsocial is faulty.
So I made a search and found another thread where you already solved the same problem, with exactly the same Fatal Error. No explanations on how you make it working.
Here is the thread : [url=http://]http://www.jomsocial.com/forum/installation/12474-solved-error-message-after-installation-is-done-with-3-101[/url]
The error is -> PHP Fatal error: Using $this when not in object context in com_community/libraries/cadminactivity.php on line 357
Could you tell me what you did to solve the problem or where I should look to find a solution to this.
Is it possible that it is a plugin or a module misconfig?
Thanks!
Php version is PHP 5.5.9-1~dotdeb.1
Mariadb 5.5 and Nginx 1.2.1
Joomla 3.2.2
Jomsocial should be 3.1.0.4, cannot check if the update has passed correctly.
++++++++++++++++++++++++++++++++++++=
Hi Michel.
Please try to upload this file to /administrator/com_community\libraries\cadminactivity.php
Hi Chris,
I got different Fatal Error after I've uploaded this attached file:
PHP Fatal error: Cannot redeclare class CommunityModelGroups in /site/front/end/components/com_community/models/groups.php on line 15
Thanks :-)
Michel
+++++++++++++++++++++++++++++++++=
Hi Michel.
I'm very sorry, but your back-end does't loads for me, also did you upgrade to the latest version of JS first ?(3.1.0.4)
Hi Chris,
Yes I did upgrade to 3.1.0.4 and everything went ok during the whole installation that I did twice in fact. I also opened the package and the file there is exactly the same I have online.
I found I can get access normaly to the admin of Jomsocial when I modify the same file at line 6 where I deleted the word "static" in the class, leaving unmodified the original line #357. I read that $this doesn't work in static context so I tried to get rid of it and then I could access the JS admin.
I am a sys and network admin, not a programmer so I don't know what could be the colateral effects on the whole code.
Concerning the access to the back-end, I learned the hard way that I will never again give root or any back-end access to my servers/sites.
So, may be you don't agree with that "philosophy", but I hope that you will accept to continue to help me.
Thanks again,
Michel
++++++++++++++++++++++++++++++++++++=
Hi Michel,
We are sorry for delay asnwer, we was on holiday yesterday..
Anyway, can you provide us the FTP access please? So I can fix your issue.
thank you
Hi!
Sorry but I never install FTP on my servers because, to my point of view, it is the most unsecure protocol.
So my problem (no access to the admin side of JS only) came from this error:
PHP Fatal error: Using $this when not in object context in /admin/side/com_community/libraries/cadminactivity.php on line 357
Chris sent me a file (cadminactivity.php) that modified the line #357, with no $this string. I synchronized the site. It doesn't work.
After that, I found that in PHP the string "$this" doesn't work in static context.
So I modified the line #6 where the function is declared as "public static function" and I deleted the word static, gave it a try and then I could get access to the admin side of Jomsocial.
With my system's config I get a 500 error but on a basic Apache/PHP config the result could be something like a blank page.
debian 7.4
PHP-FPM 5.5.9-1~dotdeb.1
Mariadb 5.5
Nginx 1.2.1
Joomla 3.2.2
Jomsocial 3.1.0.4
The other installed packages are: Akeeba backup, Admin Tools, ACL manager, EasyBlog, EasyDiscuss, Komento, Yootheme Warp 7 template, all latest version.
And everything is working pretty well but JS on admin side.
Do you have enough information to send me another patch or tell me what to do?
Thanks!
Michel
++++++++++++++++++++++++++++++++++++++=
Hi Michel,
I see, quick fix, please you change code line #357 in cadminactivity.php to this code :
$groupsModel = CFactory::getModel('groups');
Hi Dimas,
Now I get this error:
"PHP message: PHP Fatal error: Cannot redeclare class CommunityModelGroups in /var/www/components/com_community/models/groups.php on line 15"
Thanks.
Michel
++++++++++++++++++++++++++++++++=
ah that is different issue, actually that issue will be fixed in 3.2..
because you cant provide me the FTP access, so please you download this link
www.dropbox.com/s/7ofdlzgj6gww8sd/admini....1.update.190214.zip
, extract it and copy-paste to administrator/components/com_community/
Thanks Dimas,
I did exactly what you told me to do, but I get another error this time:
"PHP message: PHP Fatal error: Call to undefined method CommunityModelGroups::getPendingGroups() in /var/www/administrator/components/com_community/community.php on line 192" while reading response header from upstream
Thanks again
Michel
+++++++++++++++++++++++++++++++++=
I see, I forgot to add the community file, please you download it from here
www.dropbox.com/s/cujhkhzo53fq73n/community.php
and copy-paste to /var/www/administrator/components/com_community/
thx