Error 1064, Query Syntax error!!
- jimmygomes
- Topic Author
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
5 years 5 months 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..
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.
- Saka
- Offline
- Administrator
5 years 4 months ago #8129
by Saka
Emir Sakic
www.sakic.net
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.