Joomla Poll Producing Sql Syntax ERROR

General questions relating to Joomla! 1.5 There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Locked
bochaka
Joomla! Apprentice
Joomla! Apprentice
Posts: 24
Joined: Sun Jul 05, 2009 12:20 am

Joomla Poll Producing Sql Syntax ERROR

Post by bochaka » Sun Jul 05, 2009 12:31 am

My Joomla 1.5 polls were working fine. I then create a new poll and now evertime i try to delete, edit, publish etc in the poll manager i get the error message

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 'Is this working,1246751909)' at line 2 SQL=INSERT INTO boch_ualog VALUES( NULL,'62','com_poll','publish','index.php?option=com_poll&task=edit&cid[]=17','{user} published a poll: {link}',Is this working,1246751909)

Any Ideas on a solution. I am using the latest version.

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: Joomla Poll Producing Sql Syntax ERROR

Post by ianmac » Sun Jul 05, 2009 1:46 am

bochaka wrote:My Joomla 1.5 polls were working fine. I then create a new poll and now evertime i try to delete, edit, publish etc in the poll manager i get the error message

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 'Is this working,1246751909)' at line 2 SQL=INSERT INTO boch_ualog VALUES( NULL,'62','com_poll','publish','index.php?option=com_poll&task=edit&cid[]=17','{user} published a poll: {link}',Is this working,1246751909)

Any Ideas on a solution. I am using the latest version.
What table is boch_ualog? That is not a Joomla! core table - it is probably related to whatever extension created that table.

Ian

bochaka
Joomla! Apprentice
Joomla! Apprentice
Posts: 24
Joined: Sun Jul 05, 2009 12:20 am

Re: Joomla Poll Producing Sql Syntax ERROR

Post by bochaka » Sun Jul 05, 2009 1:54 am

Hi
I didnt use the default jos_ i gave it a different name on setup.I PRESUME IT WOULD NORMALLY BE jos_ualog.
The strange thing is how it stopped working after i added a new poll.

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: Joomla Poll Producing Sql Syntax ERROR

Post by ianmac » Sun Jul 05, 2009 3:31 am

bochaka wrote:Hi
I didnt use the default jos_ i gave it a different name on setup.I PRESUME IT WOULD NORMALLY BE jos_ualog.
The strange thing is how it stopped working after i added a new poll.
No, I understood that, but there is no table jos_ualog. Is this some third party extension that you are using? It seems like it is breaking on polls for some reason.

Ian

bochaka
Joomla! Apprentice
Joomla! Apprentice
Posts: 24
Joined: Sun Jul 05, 2009 12:20 am

Re: Joomla Poll Producing Sql Syntax ERROR

Post by bochaka » Thu Jul 09, 2009 9:38 pm

Hi
I have several joomlaworks modules frontpageslideshow etc and jce editor, could any of these cause this.

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: Joomla Poll Producing Sql Syntax ERROR

Post by ianmac » Fri Jul 10, 2009 1:39 am

bochaka wrote:Hi
I have several joomlaworks modules frontpageslideshow etc and jce editor, could any of these cause this.
More likely it is a component rather than a module or a plugin, but who knows what joomlaworks is doing.

Ian

bochaka
Joomla! Apprentice
Joomla! Apprentice
Posts: 24
Joined: Sun Jul 05, 2009 12:20 am

Re: Joomla Poll Producing Sql Syntax ERROR

Post by bochaka » Sun Jul 12, 2009 12:33 am

Ah I know what it is. Its a backend custom mod calles adminpraise2.But the cure, I dont know

moniaros
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Jun 04, 2008 12:51 pm

Re: Joomla Poll Producing Sql Syntax ERROR

Post by moniaros » Thu Oct 15, 2009 1:07 pm

The problem is solved if you make a simple change at the file plugins/system/ualog.php at function ualog_save.

Just replace the following code
$query = "INSERT INTO #__ualog VALUES("
. "\n NULL,$user_id,$com,$task,$alink,$atitle,$item,$time)";
with this one
if ($item=="") {
$query = "INSERT INTO #__ualog VALUES("
. "\n NULL,$user_id,$com,$task,$alink,$atitle,,$time)";
}
else {
$query = "INSERT INTO #__ualog VALUES("
. "\n NULL,$user_id,$com,$task,$alink,$atitle,$item,$time)";
}

moniaros
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Jun 04, 2008 12:51 pm

Re: Joomla Poll Producing Sql Syntax ERROR

Post by moniaros » Thu Oct 15, 2009 1:17 pm

correction to the code above:

Code: Select all

if ($item=="") {
		$query = "INSERT INTO #__ualog (`user_id`, `option`, `task`, `action_link`, `action_title`, `cdate`) VALUES("
		. "\n $user_id,$com,$task,$alink,$atitle,$time)";
		}
		else {
		$query = "INSERT INTO #__ualog VALUES("
		. "\n NULL,$user_id,$com,$task,$alink,$atitle,$item,$time)";
}

User avatar
dam-man
Joomla! Exemplar
Joomla! Exemplar
Posts: 7961
Joined: Fri Sep 09, 2005 2:13 pm
Location: The Netherlands
Contact:

Re: Joomla Poll Producing Sql Syntax ERROR

Post by dam-man » Thu Oct 15, 2009 3:22 pm

Mod Note :Topic moved to Joomla! general questions forum
Robert Dam - Joomla Forum Moderator
Dutch Boards | Joomla Coding Boards | English Support Boards

Joselillo
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Wed Jan 20, 2010 12:18 am

Re: Joomla Poll Producing Sql Syntax ERROR

Post by Joselillo » Wed Jan 20, 2010 7:16 am

moniaros wrote:correction to the code above:

Code: Select all

if ($item=="") {
		$query = "INSERT INTO #__ualog (`user_id`, `option`, `task`, `action_link`, `action_title`, `cdate`) VALUES("
		. "\n $user_id,$com,$task,$alink,$atitle,$time)";
		}
		else {
		$query = "INSERT INTO #__ualog VALUES("
		. "\n NULL,$user_id,$com,$task,$alink,$atitle,$item,$time)";
}

Thanks I got the same issue but after install a new banners module, your solution wrks fine moniaros.

Thanks a lot.


Locked

Return to “General Questions/New to Joomla! 1.5”