Bug Unknown column problem

SametY

Customer
Hello @Fillip H.
I have updated DragonByte eCommerce 1.5.3 today.

My problem is as follows. Would you help me with this topic?

1575327399424.png

1575327718004.png

Code:
XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'xf_dbtech_ecommerce_address.is_default' in 'order clause' src\XF\Db\AbstractStatement.php:228
Stack trace
Code:
SELECT `xf_dbtech_ecommerce_address`.*, `xf_dbtech_ecommerce_country_Country_1`.*
            FROM `xf_dbtech_ecommerce_address`
            LEFT JOIN `xf_dbtech_ecommerce_country` AS `xf_dbtech_ecommerce_country_Country_1` ON (`xf_dbtech_ecommerce_country_Country_1`.`country_code` = `xf_dbtech_ecommerce_address`.`country_code`)
            WHERE (`xf_dbtech_ecommerce_address`.`user_id` = 1)
            ORDER BY `xf_dbtech_ecommerce_address`.`is_default` DESC, CONVERT (`xf_dbtech_ecommerce_address`.`title` USING utf8mb4) ASC
        
------------

#0 src\XF\Db\Mysqli\Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src\XF\Db\Mysqli\Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
#2 src\XF\Db\Mysqli\Statement.php(54): XF\Db\Mysqli\Statement->prepare()
#3 src\XF\Db\AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#4 src\XF\Mvc\Entity\Finder.php(1294): XF\Db\AbstractAdapter->query('
            SELECT `xf_...')
#5 src\addons\DBTech\eCommerce\Pub\Controller\Account.php(98): XF\Mvc\Entity\Finder->fetch()
#6 src\XF\Mvc\Dispatcher.php(350): DBTech\eCommerce\Pub\Controller\Account->actionAddressBook(Object(XF\Mvc\ParameterBag))
#7 src\XF\Mvc\Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('DBTech\\eCommerc...', 'AddressBook', Object(XF\Mvc\RouteMatch), Object(DBTech\eCommerce\Pub\Controller\Account), NULL)
#8 src\XF\Mvc\Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(DBTech\eCommerce\Pub\Controller\Account), NULL)
#9 src\XF\Mvc\Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src\XF\App.php(2184): XF\Mvc\Dispatcher->run()
#11 src\XF.php(391): XF\App->run()
#12 index.php(20): XF::runApp('XF\\Pub\\App')
#13 {main}
Request state
Code:
<pre class='xdebug-var-dump' dir='ltr'>
<small>C:\wamp64\www\xf\src\XF\Debugger.php:28:</small>
<b>array</b> <i>(size=4)</i>
  'url' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'/xf/store/account/address-book'</font> <i>(length=33)</i>
  'referrer' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'http://localhost/xf/store/'</font> <i>(length=29)</i>
  '_GET' <font color='#888a85'>=&gt;</font>
    <b>array</b> <i>(size=0)</i>
      <i><font color='#888a85'>empty</font></i>
  '_POST' <font color='#888a85'>=&gt;</font>
    <b>array</b> <i>(size=0)</i>
      <i><font color='#888a85'>empty</font></i>
</pre>
I can't figure out where I did it wrong. Is this a bug or a configuration error? I need an urgent solution.

Thank you for your interest
 

Fillip H.

Staff member
Owner
Developer
Are you sure this didn’t happen just as you were upgrading? If this was a continuous issues, there would be more reports.
 

SametY

Customer
These problems occur when I try to enter these addresses.
index.php?store/checkout
index.php?store/account/address-book
I haven't seen a problem with other connections so far.
 

SametY

Customer
In addition, as a result of a lot of errors are as follows.
Maximum function nesting level of '256' reached, aborting!

1575329017277.png
 

SametY

Customer
I did a clean installation with DragonByte e-Commerce 1.5.3 and xenforo 2.1.5. The result has not changed.

I've run some sql commands via phpmyadmin to solve the problem myself, but again I failed.

This is a mistake and I hope you will help me with this.

I tried, but I didn't succeed.
SQL:
CREATE TABLE `xf_dbtech_ecommerce_address` (
  `address_id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `address_state` enum('visible','verified','moderated','deleted') NOT NULL DEFAULT 'visible',
  `title` varchar(100) NOT NULL,
  `business_title` varchar(255) NOT NULL,
  `business_co` varchar(100) NOT NULL,
  `address1` varchar(100) NOT NULL,
  `address2` varchar(100) NOT NULL,
  `address3` varchar(100) NOT NULL,
  `address4` varchar(100) NOT NULL,
  `country_code` char(2) NOT NULL,
  `email` varchar(120) DEFAULT NULL,
  `sales_tax_id` varchar(100) NOT NULL,
  `order_count` int(10) UNSIGNED NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 

Fillip H.

Staff member
Owner
Developer
You can resolve the error just now by running
SQL:
ALTER TABLE `xf_dbtech_ecommerce_address`
  ADD `is_default` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'
  AFTER `sales_tax_id`
I'll push a new version at some point this week that should resolve any half-applied upgrades.
 

SametY

Customer
Thank you for your attention. Your query worked. He's working now. ;)

However, it would be really good to fix this with an update. Because not everyone can run these queries.

Respects...
 

SametY

Customer
When I try to add an address, I get this error now.

1575384115580.png

1575383670997.png

Server error log
Code:
XF\Db\Exception: MySQL query error [1048]: Column 'address_id' cannot be null src/XF/Db/AbstractStatement.php:228
Stack trace
Code:
INSERT  INTO `xf_dbtech_ecommerce_address` (`user_id`, `title`, `business_title`, `business_co`, `address1`, `address2`, `address3`, `address4`, `country_code`, `sales_tax_id`, `is_default`, `address_id`, `address_state`, `order_count`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1048, '23000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1048, '23000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(218): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1452): XF\Db\AbstractAdapter->insert('xf_dbtech_ecomm...', Array, false)
#5 src/XF/Mvc/Entity/Entity.php(1184): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/addons/DBTech/eCommerce/Service/Address/Create.php(145): XF\Mvc\Entity\Entity->save(true, false)
#7 src/XF/Service/ValidateAndSavableTrait.php(40): DBTech\eCommerce\Service\Address\Create->_save()
#8 src/addons/DBTech/eCommerce/Pub/Controller/Account.php(257): DBTech\eCommerce\Service\Address\Create->save()
#9 src/XF/Mvc/Dispatcher.php(350): DBTech\eCommerce\Pub\Controller\Account->actionAddressSave(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('DBTech\\eCommerc...', 'AddressSave', Object(XF\Mvc\RouteMatch), Object(DBTech\eCommerce\Pub\Controller\Account), NULL)
#11 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(DBTech\eCommerce\Pub\Controller\Account), NULL)
#12 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#14 src/XF.php(391): XF\App->run()
#15 index.php(20): XF::runApp('XF\\Pub\\App')
#16 {main}
Request state
Code:
array(4) {
  ["url"] => string(35) "/store/account/address-book/save/0/"
  ["referrer"] => string(49) "http://******/store/account/address-book"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(13) {
    ["title"] => string(4) "Work"
    ["business_title"] => string(6) "SametY"
    ["business_co"] => string(7) "XenForo"
    ["address1"] => string(24) "San.Sitesi.10 Blok No:13"
    ["address2"] => string(15) "Keşan / Edirne"
    ["address3"] => string(0) ""
    ["address4"] => string(0) ""
    ["country_code"] => string(2) "TR"
    ["sales_tax_id"] => string(0) ""
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(27) "/store/account/address-book"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
Do you have a quick solution?
 

Fillip H.

Staff member
Owner
Developer
This is because the create table statement you created yourself is wrong. You're missing the primary key / auto increment on the address_id column.
 

DragonByte Technologies

Company Information
Staff member
Company Info
Hello @SametY,

We hope your ticket regarding DragonByte eCommerce has been addressed to your satisfaction. This ticket has now been scheduled to be closed.

If your ticket has not been resolved, you can reply to this thread at any point in the next 7 days in order to reopen the ticket, afterwards this thread will be closed.

Please do not reply to this thread if your ticket has been resolved.

Thank you.


- DragonByte Technologies, Ltd.
 

DragonByte eCommerce

XenForo 2.0.6+ XenForo 2.1.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
778
Customer rating
4.80 star(s) 5 ratings
Top