Error 1064, Query Syntax error!!

4 months 3 weeks ago #8119 by jimmygomes
Hi,

I'm using SEF Advance on a site with DTRegister. The problem here is not about compatibility, but a query issue. DTRegister is not compatible, so I have disabled it. But clicking on the "Next Step" button on the confirmation page, I got an Error 1064. Debugging I found that it is related to the Itemid of the page.

At least for this project, it is ok if don't have Itemid for that page, so I'm suggesting a small change on a query to fix this.

File: /components/com_sefadvance/sefadvance.php : 159
$db->setQuery('SELECT link FROM #__menu WHERE id='.$temp[0]);

change to:
$db->setQuery('SELECT link FROM #__menu WHERE id='.$db->quote($temp[0]));
That way, if for any reason we don't have a value for that var, we don't finish with an syntax error, but we will drop to the conditional below:
if (!empty($link)) {
$url = $link;
}
That fixed to me ;) I hope you can put this on the next release..

Please Log in or Create an account to join the conversation.

4 months 1 week ago #8129 by Saka
Thank you. Will make sure to update it in the next release.

Emir Sakic
www.sakic.net

Please Log in or Create an account to join the conversation.

About us

We provide high quality Joomla components created by a co-founder and original core developer of Joomla. For over a decade, our products have been used by more than 20.000 webmasters around the world.

We also recommend

Twitter

sakicnet: Pencilmate and the Big Red Button https://t.co/a1vA1MQR2z 143 days ago from iOS

Stay in touch