Facebook 

SMFHacks.com - Celebrating 20 Years!

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4341
Latest: jmac32here
New This Month: 2
New This Week: 0
New Today: 0
Stats
Total Posts: 44306
Total Topics: 7676
Most Online Today: 365
Most Online Ever: 27044
(May 30, 2026, 09:10:16 pm)
Users Online
Members: 0
Guests: 226
Total: 226

Author Topic: Database Error for Store in SMF2.1.2  (Read 12396 times)

0 Members and 1 Guest are viewing this topic.

Database Error for Store in SMF2.1.2
« on: »
Hi,

I am testing our upgrade to SMF 2.1.2 and have just installed Store version 5.0Beta

In testing the purchase of an item in the store when trying to add the item to the cart I received the following error

Quote
Field 'ID_ITEM' doesn't have a default value
File: /home/kkogcoma/public_html/smf2/Sources/Store2.php
Line: 4440


I have added a screen shot of the error

Regards
Greg Ralph
KKOG Forum Admin

Re: Database Error for Store in SMF2.1.2
« Reply #1 on: »
A quick hotfix you can run this query on your database.
Code: [Select]
ALTER TABLE smf_store_item_custom_field_data CHANGE ID_ITEM ID_ITEM int(11) default 0;
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Database Error for Store in SMF2.1.2
« Reply #2 on: »
Hi,

Thanks for the hot fix

Running some additional checks, and the store item has a custom field attached.  The custom field is to record the mobile number of the buyer so that it can be included in the shipping details.

on deleting the custom field the add to cart works correctly.

If I run the hot fix on the database, will this affect the updated version of the Store mod or will an updated Store mod fix the database?  As I am currently in test mode, I am happy to wait for a new version to download.

Regards
Greg Ralph
KKOG Forum Admin
« Last Edit: October 12, 2022, 09:39:16 pm by KKOG »

Re: Database Error for Store in SMF2.1.2
« Reply #3 on: »
It will not affect anything running on a live site. The fix will be included in a future update.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Database Error for Store in SMF2.1.2
« Reply #4 on: »
Thank you

Re: Database Error for Store in SMF2.1.2
« Reply #5 on: »
Is there a timeframe for the next version of the store as I would now like to migrate our production site to SMF 2.1.2

Thanks
Greg Ralph
KKOG Forum Admin

Re: Database Error for Store in SMF2.1.2
« Reply #6 on: »
There is not currently. I can add the fix in the download if needed.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Database Error for Store in SMF2.1.2
« Reply #7 on: »
If you could add the fix to the current download (5.0beta) it would be appreciated

Thanks
Greg Ralph
KKOG Forum Admin

Re: Database Error for Store in SMF2.1.2
« Reply #8 on: »
Updated download. Has same filename.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Database Error for Store in SMF2.1.2
« Reply #9 on: »
Thank you, I have downloaded the revised file

Regards
Greg Ralph
KKOG Forum Admin

Re: Database Error for Store in SMF2.1.2
« Reply #10 on: »
Hello,

On installing the revised version of the Store I received the following error:

Quote
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''' at line 1
File: /home/kkogcoma/public_html/smf2/Packages/temp/storeinstall2.php
Line: 1062

I have included a screen shot of the error.

[ Guests cannot view attachments ]

Thanks
Greg Ralph
KKOG Forum Admin

Re: Database Error for Store in SMF2.1.2
« Reply #11 on: »
Try again uploaded a new package.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Database Error for Store in SMF2.1.2
« Reply #12 on: »
Thank you,

Downloaded new file

Regards
Greg Ralph
KKOG Forum Admin

Re: Database Error for Store in SMF2.1.2
« Reply #13 on: »
Successful Install

Thank you

Regards
Greg Ralph
KKOG Forum Admin
Like Like x 1 View List

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
325869 Views
Last post February 09, 2008, 11:44:03 pm
by ApplianceJunk
10 Replies
13721 Views
Last post February 24, 2009, 08:08:08 pm
by Beltazar
2 Replies
5247 Views
Last post November 25, 2009, 07:43:15 am
by guest3817
4 Replies
53114 Views
Last post October 09, 2011, 03:59:37 pm
by SMFHacks
7 Replies
6703 Views
Last post May 20, 2022, 08:58:15 pm
by Michael Vail

+- Recent Topics

Registration - anti bot pattern matching by SMFHacks
November 01, 2026, 07:20:17 pm

EZPortal 8 by davejo
October 21, 2026, 01:01:54 pm

Downloads Pro 7.0 Released by SMFHacks
October 07, 2026, 07:35:30 pm

[Mod]ActivityPub Federation for SMF 2.1 by SMFHacks
October 01, 2026, 05:03:45 pm

Newsletter Pro 4.0 Released by SMFHacks
September 23, 2026, 08:08:24 pm

Can't remove or restore any item from the recycle bin by SMFHacks
September 22, 2026, 11:01:51 am

MCP Server for SMF 2.1 - let Claude, ChatGPT or Cursor run your admin chores by SMFHacks
September 12, 2026, 02:50:45 pm

Suggestions for improvements to Ultimate Shoutbox & Chatroom by davejo
September 02, 2026, 01:35:09 am

Automatic Sorting of Categories by Kiwi
August 31, 2026, 12:36:09 am

' appears as ' in Most Viewed (and Recent Items ?) by SMFHacks
August 22, 2026, 11:01:56 pm

Powered by EzPortal