Joomla Poll Producing Sql Syntax ERROR
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.
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.
-
- Joomla! Apprentice
- Posts: 24
- Joined: Sun Jul 05, 2009 12:20 am
Joomla Poll Producing Sql Syntax ERROR
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.
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.
- ianmac
- Joomla! Virtuoso
- Posts: 4784
- Joined: Sat Sep 24, 2005 11:01 pm
- Location: Toronto, Canada
Re: Joomla Poll Producing Sql Syntax ERROR
What table is boch_ualog? That is not a Joomla! core table - it is probably related to whatever extension created that table.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.
Ian
-
- Joomla! Apprentice
- Posts: 24
- Joined: Sun Jul 05, 2009 12:20 am
Re: Joomla Poll Producing Sql Syntax ERROR
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.
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.
- ianmac
- Joomla! Virtuoso
- Posts: 4784
- Joined: Sat Sep 24, 2005 11:01 pm
- Location: Toronto, Canada
Re: Joomla Poll Producing Sql Syntax ERROR
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.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.
Ian
-
- Joomla! Apprentice
- Posts: 24
- Joined: Sun Jul 05, 2009 12:20 am
Re: Joomla Poll Producing Sql Syntax ERROR
Hi
I have several joomlaworks modules frontpageslideshow etc and jce editor, could any of these cause this.
I have several joomlaworks modules frontpageslideshow etc and jce editor, could any of these cause this.
- ianmac
- Joomla! Virtuoso
- Posts: 4784
- Joined: Sat Sep 24, 2005 11:01 pm
- Location: Toronto, Canada
Re: Joomla Poll Producing Sql Syntax ERROR
More likely it is a component rather than a module or a plugin, but who knows what joomlaworks is doing.bochaka wrote:Hi
I have several joomlaworks modules frontpageslideshow etc and jce editor, could any of these cause this.
Ian
-
- Joomla! Apprentice
- Posts: 24
- Joined: Sun Jul 05, 2009 12:20 am
Re: Joomla Poll Producing Sql Syntax ERROR
Ah I know what it is. Its a backend custom mod calles adminpraise2.But the cure, I dont know
-
- Joomla! Fledgling
- Posts: 2
- Joined: Wed Jun 04, 2008 12:51 pm
Re: Joomla Poll Producing Sql Syntax ERROR
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)";
}
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)";
}
-
- Joomla! Fledgling
- Posts: 2
- Joined: Wed Jun 04, 2008 12:51 pm
Re: Joomla Poll Producing Sql Syntax ERROR
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)";
}
- dam-man
- Joomla! Exemplar
- Posts: 7961
- Joined: Fri Sep 09, 2005 2:13 pm
- Location: The Netherlands
- Contact:
Re: Joomla Poll Producing Sql Syntax ERROR
Mod Note :Topic moved to Joomla! general questions forum
Robert Dam - Joomla Forum Moderator
Dutch Boards | Joomla Coding Boards | English Support Boards
Dutch Boards | Joomla Coding Boards | English Support Boards
-
- Joomla! Apprentice
- Posts: 9
- Joined: Wed Jan 20, 2010 12:18 am
Re: Joomla Poll Producing Sql Syntax ERROR
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.