Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Problem with downgrading version

8 years 6 months ago
  • Tomas's Avatar
    Topic Author
  • Tomas
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Licenses:
JomSocial Active

I installed a clean joomla with kunena and jomsocial in order to try to fix a bug on another site.
The main problem is that i get an error message (Error displaying the error page: Application Instantiation Error: Application Instantiation Error) on a custom made API girltalk.dk/app/api.php (used to service a mobile app) that was working fine before upgrading jomsocial. So I assume it has to do with code changes.
The bug is related to CFactory::getModel(...). since removing the community part lets it run fine.

My mirror dev site dev.girltalk.dk/app/api.php (with jomsocial 4.1.6) it does not return the error

So, I made a blank site to test with dev2.girltalk.dk to continue testing. Latest joomla, knuena and jomsocial.
- same error on dev2.girltalk.dk/app/api.php

Now trying to downgrade to 4.0.10 but getting an error when going to the administration of jomsocial

---
Warning: require_once(/usr/www/users/girltax/dev2.girltalk.dk/components/com_community/models/community.php): failed to open stream: No such file or directory in /usr/www/users/girltax/dev2.girltalk.dk/components/com_community/libraries/core.php on line 656

Fatal error: require_once(): Failed opening required '/usr/www/users/girltax/dev2.girltalk.dk/components/com_community/models/community.php' (include_path='.:/usr/local/lib/php/') in /usr/www/users/girltax/dev2.girltalk.dk/components/com_community/libraries/core.php on line 656
---

I need help to get it running on the clean site so I continue from there.

Any documentation relating to changes in CFactory::getModel(...) since 4.1.6 would also be welcome.

8 years 6 months ago
  • Tomas's Avatar
    Topic Author
  • Tomas
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Licenses:
JomSocial Active

I tried uninstalling all (very many!) plugins and the component and reinstalling 4.0.10, but same error persisting.

8 years 6 months ago
  • Tomas's Avatar
    Topic Author
  • Tomas
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Licenses:
JomSocial Active

Here is the first part of my script api.php.
I'm wondering if you changed the model from getModel to getUser ?
The code seems to be breaking already at require_once JPATH_BASE . '/components/com_community/libraries/core.php';

---- code ----

<?php
define('_JEXEC', 1);
define('JPATH_BASE', realpath('../'));
define('KPATH_ADMIN', JPATH_BASE . 'administrator/components/com_kunena');
ini_set('display_errors', '1');
error_reporting(1);
define('JDEBUG', 0);
require_once JPATH_BASE . '/includes/defines.php';
require_once JPATH_BASE . '/includes/framework.php';
require_once JPATH_BASE . '/libraries/joomla/factory.php';
require_once JPATH_BASE . '/components/com_community/defines.community.php';
require_once JPATH_BASE . '/components/com_community/libraries/core.php';
require_once JPATH_BASE . '/libraries/kunena/bootstrap.php';
require_once JPATH_BASE . '/components/com_kunena/models/category.php';

$app = JFactory::getApplication('site');
$app->initialise();
$db = JFactory::getDbo();
$session = JFactory::getSession();
$friendModel = CFactory::getModel( 'friends' );
$inboxModel = CFactory::getModel( 'inbox' );
$categoryModel = new KunenaModelCategory();

$language = JFactory::getLanguage();
$language->setLanguage('da-DK');
$language->load('lib_joomla');

$user = NULL;
$token = ($_POST) OR '';
$action = ($_POST) OR '';
$json = new stdClass;
$json->user = new stdClass;
$json->data = NULL;
$json->err = 1;
$json->msg = '';

8 years 6 months ago
Licenses:

HI, Tomas.

Thank you for contacting us.
Issue you experience:

Fatal error: require_once(): Failed opening required '/usr/www/users/girltax/dev2.girltalk.dk/components/com_community/models/community.php' (include_path='.:/usr/local/lib/php/') in /usr/www/users/girltax/dev2.girltalk.dk/components/com_community/libraries/core.php on line 656

Is related with incompatibility of JomSocial version you downgraded with latest version of Joomla!. That means you'll need to downgrade Joomla! as well.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
8 years 6 months ago
  • Tomas's Avatar
    Topic Author
  • Tomas
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Licenses:
JomSocial Active

What version of joomla will match 4.0.10 and 4.1.7 ?
I will do a clean install then...

8 years 6 months ago
  • Tomas's Avatar
    Topic Author
  • Tomas
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Licenses:
JomSocial Active

I managed to debug the code and find the bug.

/components/com_community/libraries/core.php - line 42
#JFactory::getLanguage()->load('com_community');

I also reinstalled the danish language files via the administration.

My api script works fine with line 42 commented out. And Jomsocial also shows the labels in Danish.

what is the use of this line 42 of code then??
I would hope for a fix that would not require med to comment out code in the core files since they would be overwritten on upgrading.

8 years 6 months ago
Licenses:

Hi, Tomas.

Good find ;) I'll assign developer to help you with that.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
8 years 6 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Tomas,

Why you dont install the latest version? because we have critical issue on old jomsocial version due newest Joomla version 3.6.x, if you want to use old Jomsocial version, please you use Joomla version < 3.6.x

thank you

8 years 6 months ago
  • Tomas's Avatar
    Topic Author
  • Tomas
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Licenses:
JomSocial Active

I upgraded everything to newerst version already!

8 years 5 months ago
  • Tomas's Avatar
    Topic Author
  • Tomas
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Licenses:
JomSocial Active

So, any suggestions?

I AM already using latest versions of everything :-)

8 years 5 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Tomas,

Ok, please provide me the steps to replicate this on your API code.. also guide me to edit your API and tell me how it works.

thank you!

8 years 5 months ago
  • Tomas's Avatar
    Topic Author
  • Tomas
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Licenses:
JomSocial Active

Hi Dimas, let me sum it up here..

FTP access is in the top post. The script is on the actual live site now since it is working with the hack.

My API script for the mobile app is on girltalk.dk/app/api.php . The script outputs json and will give an error message in json when run from outside the app, that is ok since no request has been passed. You don't need to install the mobile app to test the API in this case.

The "bug" is in /components/com_community/libraries/core.php - line 42 (as stated earlier)
#JFactory::getLanguage()->load('com_community');

To replicate simply uncomment line 42 and the API will return a system error instead of json when you open it in the browser.

I also reinstalled the danish language files via the administration.
My api script works fine with line 42 commented out. And Jomsocial also shows the labels in Danish on the website so I'm wondering what getLanguage actually does then...

Let me know if you have any other questions :-)

8 years 5 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Tomas,

Your FTP access is not working for me, seems username and password invalid, would you mind check again, please?

thank you!

8 years 5 months ago
  • Tomas's Avatar
    Topic Author
  • Tomas
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Licenses:
JomSocial Active

Sorry about that!, i fixed it now.

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW