[Skip to main content](#vessel-content)

#   Guest Post-Checkout Registration SQL error.

##

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

5 years 11 months ago [\#326219](#326219) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  *[Guest Post-Checkout Registration SQL error.](/forum/27-checkout/901274-guest-post-checkout-registration-sql-error#326219 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.22 -- PHP version -- : 7.3.24  I am launching a site update tonight without one of the improvements I wanted to make because of an error that has popped up.  I had hoped to incorporate Hikashop's Guest Checkout along with a site redesign and update from Hikashop 4.2 . BTW, The documentation about how the Guest Checkout really functions its really skimpy, but I finally found enough description to understand how it actually works, and am pretty satisfied with that process.  However, once I configured it, the link provided on the Guest receipt leads back to the registration form (with the latest reCaptcha activated) but when I submit the form, it generates a SQL error that is reported through Joomla's messaging system.  The error reads that there is a syntax error that occurring &quot;near ' 2)' on line 3&quot;, but includes no URL. Because the page logs the error message but doesn't stop processing I don't know where the message is occurring, and I can't get the full Query text. The &quot;line 3&quot; part seems particularly unusual.  Turning on Debug lists SQL queries, but I can't identify this error in them. Manually tracking it, I learned that a Joomla User record is created (id = 0), but before it gets re-numbered as a proper Joomla User, Hikashop's user class's guestRegister method is killed, and the form redraws - without even deleting the Joomla User record.  I've run the database checks on both Joomla and Hikashop.  Until I can squash that bug, I can't activate Guest purchases. That's not enough to delay the update, but I'd like to make real Guest purchases available.  If you need to visit the site, please wait until the weekend is over and my transfer/update is complete.  Meanwhile, any ideas?")* was created by *[icomex](/forum/user/4967-icomex "View icomex's Profile")*

-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.22
-- PHP version -- : 7.3.24

I am launching a site update tonight without one of the improvements I wanted to make because of an error that has popped up.

I had hoped to incorporate Hikashop's Guest Checkout along with a site redesign and update from Hikashop 4.2 . BTW, The documentation about how the Guest Checkout really functions its really skimpy, but I finally found enough description to understand how it actually works, and am pretty satisfied with that process.

However, once I configured it, the link provided on the Guest receipt leads back to the registration form (with the latest reCaptcha activated) but when I submit the form, it generates a SQL error that is reported through Joomla's messaging system.

The error reads that there is a syntax error that occurring "near ' 2)' on line 3", but includes no URL. Because the page logs the error message but doesn't stop processing I don't know where the message is occurring, and I can't get the full Query text. The "line 3" part seems particularly unusual.

Turning on Debug lists SQL queries, but I can't identify this error in them. Manually tracking it, I learned that a Joomla User record is created (id = 0), but before it gets re-numbered as a proper Joomla User, Hikashop's user class's guestRegister method is killed, and the form redraws - without even deleting the Joomla User record.

I've run the database checks on both Joomla and Hikashop.

Until I can squash that bug, I can't activate Guest purchases. That's not enough to delay the update, but I'd like to make real Guest purchases available.

If you need to visit the site, please wait until the weekend is over and my transfer/update is complete.

Meanwhile, any ideas?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMTI3NC1ndWVzdC1wb3N0LWNoZWNrb3V0LXJlZ2lzdHJhdGlvbi1zcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

5 years 11 months ago [\#326285](#326285) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Guest Post-Checkout Registration SQL error.](/forum/27-checkout/901274-guest-post-checkout-registration-sql-error#326285 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.22 -- PHP version -- : 7.3.24  I am launching a site update tonight without one of the improvements I wanted to make because of an error that has popped up.  I had hoped to incorporate Hikashop's Guest Checkout along with a site redesign and update from Hikashop 4.2 . BTW, The documentation about how the Guest Checkout really functions its really skimpy, but I finally found enough description to understand how it actually works, and am pretty satisfied with that process.  However, once I configured it, the link provided on the Guest receipt leads back to the registration form (with the latest reCaptcha activated) but when I submit the form, it generates a SQL error that is reported through Joomla's messaging system.  The error reads that there is a syntax error that occurring &quot;near ' 2)' on line 3&quot;, but includes no URL. Because the page logs the error message but doesn't stop processing I don't know where the message is occurring, and I can't get the full Query text. The &quot;line 3&quot; part seems particularly unusual.  Turning on Debug lists SQL queries, but I can't identify this error in them. Manually tracking it, I learned that a Joomla User record is created (id = 0), but before it gets re-numbered as a proper Joomla User, Hikashop's user class's guestRegister method is killed, and the form redraws - without even deleting the Joomla User record.  I've run the database checks on both Joomla and Hikashop.  Until I can squash that bug, I can't activate Guest purchases. That's not enough to delay the update, but I'd like to make real Guest purchases available.  If you need to visit the site, please wait until the weekend is over and my transfer/update is complete.  Meanwhile, any ideas?")*

Hi,

The first thing to do here is to do this change in the code of Joomla:
[ www.hikashop.com/support/forum/product-c...eld-list.html#304882](https://www.hikashop.com/support/forum/product-category-display/897111-1054-unknown-column-b-product-volume-in-field-list.html#304882)
Then, reproduce the error, and the error will display the full MySQL query which generates the error.
That will allow us to understand where the problem comes from.
Also, when you reproduce the issue, do so after activating both the error reporting and the debug mode settings of the Joomla configuration.
That way, when the error happens, you should also get the call stack of the PHP files leading to the MySQL error which will help further pin point the problem.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMTI3NC1ndWVzdC1wb3N0LWNoZWNrb3V0LXJlZ2lzdHJhdGlvbi1zcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

5 years 11 months ago [\#326322](#326322) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  Replied by *[icomex](/forum/user/4967-icomex "View icomex's Profile")* on topic *[Guest Post-Checkout Registration SQL error.](/forum/27-checkout/901274-guest-post-checkout-registration-sql-error#326322 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.22 -- PHP version -- : 7.3.24  I am launching a site update tonight without one of the improvements I wanted to make because of an error that has popped up.  I had hoped to incorporate Hikashop's Guest Checkout along with a site redesign and update from Hikashop 4.2 . BTW, The documentation about how the Guest Checkout really functions its really skimpy, but I finally found enough description to understand how it actually works, and am pretty satisfied with that process.  However, once I configured it, the link provided on the Guest receipt leads back to the registration form (with the latest reCaptcha activated) but when I submit the form, it generates a SQL error that is reported through Joomla's messaging system.  The error reads that there is a syntax error that occurring &quot;near ' 2)' on line 3&quot;, but includes no URL. Because the page logs the error message but doesn't stop processing I don't know where the message is occurring, and I can't get the full Query text. The &quot;line 3&quot; part seems particularly unusual.  Turning on Debug lists SQL queries, but I can't identify this error in them. Manually tracking it, I learned that a Joomla User record is created (id = 0), but before it gets re-numbered as a proper Joomla User, Hikashop's user class's guestRegister method is killed, and the form redraws - without even deleting the Joomla User record.  I've run the database checks on both Joomla and Hikashop.  Until I can squash that bug, I can't activate Guest purchases. That's not enough to delay the update, but I'd like to make real Guest purchases available.  If you need to visit the site, please wait until the weekend is over and my transfer/update is complete.  Meanwhile, any ideas?")*

Thank you for the guidance.

I haven't had the to apply all the instructions yet, but the SQL query at issue is

INSERT INTO &#96;xisu6_user_usergroup_map&#96; (&#96;user_id&#96;,&#96;group_id&#96;) VALUES (, 2)

That will help narrow it down.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMTI3NC1ndWVzdC1wb3N0LWNoZWNrb3V0LXJlZ2lzdHJhdGlvbi1zcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

5 years 11 months ago [\#326328](#326328) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  Replied by *[icomex](/forum/user/4967-icomex "View icomex's Profile")* on topic *[Guest Post-Checkout Registration SQL error.](/forum/27-checkout/901274-guest-post-checkout-registration-sql-error#326328 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.22 -- PHP version -- : 7.3.24  I am launching a site update tonight without one of the improvements I wanted to make because of an error that has popped up.  I had hoped to incorporate Hikashop's Guest Checkout along with a site redesign and update from Hikashop 4.2 . BTW, The documentation about how the Guest Checkout really functions its really skimpy, but I finally found enough description to understand how it actually works, and am pretty satisfied with that process.  However, once I configured it, the link provided on the Guest receipt leads back to the registration form (with the latest reCaptcha activated) but when I submit the form, it generates a SQL error that is reported through Joomla's messaging system.  The error reads that there is a syntax error that occurring &quot;near ' 2)' on line 3&quot;, but includes no URL. Because the page logs the error message but doesn't stop processing I don't know where the message is occurring, and I can't get the full Query text. The &quot;line 3&quot; part seems particularly unusual.  Turning on Debug lists SQL queries, but I can't identify this error in them. Manually tracking it, I learned that a Joomla User record is created (id = 0), but before it gets re-numbered as a proper Joomla User, Hikashop's user class's guestRegister method is killed, and the form redraws - without even deleting the Joomla User record.  I've run the database checks on both Joomla and Hikashop.  Until I can squash that bug, I can't activate Guest purchases. That's not enough to delay the update, but I'd like to make real Guest purchases available.  If you need to visit the site, please wait until the weekend is over and my transfer/update is complete.  Meanwhile, any ideas?")*

What appears to be happening is that when the new Joomla User is successfully created from the Hikashop Order info, Joomla assigns it an ID value of 0. The SQL error comes when attempting to associate the User Group Map, since the $this-&gt;id value being tossed around in the code is blank, not 0.

Adding (int) to the $this-&gt;id variable in /libraries/src/Table/User.php around line 372 (where the groups are mapped to the user one at a time) makes that part work, but the User's ID number never gets changed from 0.

That's as far as I have gotten, so Guest Registration is still not working for me.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMTI3NC1ndWVzdC1wb3N0LWNoZWNrb3V0LXJlZ2lzdHJhdGlvbi1zcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

5 years 11 months ago [\#326332](#326332) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  Replied by *[icomex](/forum/user/4967-icomex "View icomex's Profile")* on topic *[Guest Post-Checkout Registration SQL error.](/forum/27-checkout/901274-guest-post-checkout-registration-sql-error#326332 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.22 -- PHP version -- : 7.3.24  I am launching a site update tonight without one of the improvements I wanted to make because of an error that has popped up.  I had hoped to incorporate Hikashop's Guest Checkout along with a site redesign and update from Hikashop 4.2 . BTW, The documentation about how the Guest Checkout really functions its really skimpy, but I finally found enough description to understand how it actually works, and am pretty satisfied with that process.  However, once I configured it, the link provided on the Guest receipt leads back to the registration form (with the latest reCaptcha activated) but when I submit the form, it generates a SQL error that is reported through Joomla's messaging system.  The error reads that there is a syntax error that occurring &quot;near ' 2)' on line 3&quot;, but includes no URL. Because the page logs the error message but doesn't stop processing I don't know where the message is occurring, and I can't get the full Query text. The &quot;line 3&quot; part seems particularly unusual.  Turning on Debug lists SQL queries, but I can't identify this error in them. Manually tracking it, I learned that a Joomla User record is created (id = 0), but before it gets re-numbered as a proper Joomla User, Hikashop's user class's guestRegister method is killed, and the form redraws - without even deleting the Joomla User record.  I've run the database checks on both Joomla and Hikashop.  Until I can squash that bug, I can't activate Guest purchases. That's not enough to delay the update, but I'd like to make real Guest purchases available.  If you need to visit the site, please wait until the weekend is over and my transfer/update is complete.  Meanwhile, any ideas?")*

I have a sneaking suspicion.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMTI3NC1ndWVzdC1wb3N0LWNoZWNrb3V0LXJlZ2lzdHJhdGlvbi1zcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

5 years 11 months ago [\#326335](#326335) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  Replied by *[icomex](/forum/user/4967-icomex "View icomex's Profile")* on topic *[Guest Post-Checkout Registration SQL error.](/forum/27-checkout/901274-guest-post-checkout-registration-sql-error#326335 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.22 -- PHP version -- : 7.3.24  I am launching a site update tonight without one of the improvements I wanted to make because of an error that has popped up.  I had hoped to incorporate Hikashop's Guest Checkout along with a site redesign and update from Hikashop 4.2 . BTW, The documentation about how the Guest Checkout really functions its really skimpy, but I finally found enough description to understand how it actually works, and am pretty satisfied with that process.  However, once I configured it, the link provided on the Guest receipt leads back to the registration form (with the latest reCaptcha activated) but when I submit the form, it generates a SQL error that is reported through Joomla's messaging system.  The error reads that there is a syntax error that occurring &quot;near ' 2)' on line 3&quot;, but includes no URL. Because the page logs the error message but doesn't stop processing I don't know where the message is occurring, and I can't get the full Query text. The &quot;line 3&quot; part seems particularly unusual.  Turning on Debug lists SQL queries, but I can't identify this error in them. Manually tracking it, I learned that a Joomla User record is created (id = 0), but before it gets re-numbered as a proper Joomla User, Hikashop's user class's guestRegister method is killed, and the form redraws - without even deleting the Joomla User record.  I've run the database checks on both Joomla and Hikashop.  Until I can squash that bug, I can't activate Guest purchases. That's not enough to delay the update, but I'd like to make real Guest purchases available.  If you need to visit the site, please wait until the weekend is over and my transfer/update is complete.  Meanwhile, any ideas?")*

I found it. Not a code issue. Apparently, the indexes for the Users table got hosed, along with the AutoIncrement setting. Joomla's Database tools apparently check filenames, but not indexes.

Once I rebuilt the index and the setting the user ID value was correct and the Guest User registered properly

Thank you for your help. Even if the issue had nothing to do with HikaShop, your suggestion did lead me to the solution.

The following user(s) said Thank You: [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMTI3NC1ndWVzdC1wb3N0LWNoZWNrb3V0LXJlZ2lzdHJhdGlvbi1zcWwtZXJyb3I/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.064 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
