0

I have recently upgraded Joomla from 2.5 to 3.0 and also upgraded my JomSocial to the latest version. Immediately after upgrading, everything worked fine. I then woke up this morning to a SQL error. There is as follows:

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND memberid=1293' at line 1 SQL=DELETE FROM d8whn_community_groups_members WHERE groupid= AND memberid=1293

because of this error I cannot get to my admin page anymore. I get this error on both the main site and the admin site.

I think this is being caused by JomSocial since it references the community_groups_members table. So I attempted to manually remove all of the components and plugins, and modules, as well as all of the tables that contained _community in the database. So My question is two fold.

  1. Has anyone experienced this and do you possibly have a solution?
  2. Is there a way that I can directly pinpoint which file the error is coming from?

This is a critical problem as it has my site completely down. Can anyone help me?

THanks so much for your time.

1 Answers1

0

The error is caused by a model having incomplete information about the user: it is trying to access user 1293 group memberships, but it has no groupid available; also, the error would be easily preventable if the statement were written like this:

'... where groupid='.$db->quote($groupid).' AND memberid='. $db->quote($memberid)

That said, removing jomsocial entirely should get rid of it. Did you follow their upgrade guide which lists the plugins you need to uninstall? Search for the following strings in the plugin manager to find all:

  • joms
  • commu
  • zend
  • azrul

Else if you want to spot the error and keep jomsocial on your site, or should this procedure not get rid of the error, simply find the following strings in your site:

  • groupid
  • memberid
  • #__community_groups_members

the latter being easiest to spot with only 81 occurrences in the latest jomsocial version. I checked a few files, and many escape values properly. This means you can most likely solve by upgrading jomsocial to the latest version. If the error is still there it could be in a custom plugin / module / template, but it will show up in the search for the above strings.

Riccardo Zorn
  • 5,590
  • 1
  • 20
  • 36