Error 1064, Query Syntax error

10 years 3 weeks ago #7296 by ekal
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...

Thanks

The web's best Joomla! SEO resources: Alledia.com
Joomla Training in the USA: JoomlaTraining.com

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

10 years 3 weeks ago #7298 by Saka
Sure, thanks.

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.

Stay in touch