What's new
Xen Factory

Register today to become a member! Once signed in, you'll be able to start purchasing our products, ask questions, request support and suggest new ideas!

  • This area is dedicated to the support of our xF1 add-ons. For xF2, please use the dedicated area: HERE.
  • We are aware that a no permission error was shown when you tried to purchase in the last 2 days, this is now fixed.

Bug Fixed Error: Undefined Index: usd

Omar

New Member
Hey,

I am on version 1.3.1 (uninstalled 1.3.0 and installed 1.3.1) and here is what I receive when making a new sale:

Code:
ErrorException: Undefined index: usd - library/XFA/ForumSales/Extends/ControllerPublic/Thread.php:55
Generated By: Omar, 1 minute ago

Code:
#0 /var/www/runenova/forum/library/XFA/ForumSales/Extends/ControllerPublic/Thread.php(55): XenForo_Application::handlePhpError(8, 'Undefined index...', '/var/www/rune...', 55, Array)
#1 /var/www/runenova/forum/library/XenForo/FrontController.php(351): XFA_ForumSales_Extends_ControllerPublic_Thread->actionForumSaleManage()
#2 /var/www/runenova/forum/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#3 /var/www/lrunenova/forum/index.php(13): XenForo_FrontController->run()
#4 {main}

Code:
array(3) {
  ["url"] => string(80) "https://runenova.com/forum/threads/selling-osrs-gp-1-17-1-25-m.52/forum-sale-manage"
  ["_GET"] => array(1) {
   ["uri"] => string(0) ""
  }
  ["_POST"] => array(10) {
   ["xfa_sell"] => string(1) "1"
   ["xfa_fss_status"] => string(7) "forsale"
   ["xfa_fss_quantity"] => string(2) "23"
   ["xfa_fss_price"] => string(4) "1.25"
   ["xfa_fss_currency"] => string(3) "usd"
   ["xfa_fss_paypal_email"] => string(26) "paypal@paragonsoftworks.ru"
   ["xfa_fss_accept_manual"] => string(1) "1"
   ["xfa_fss_require_address"] => string(1) "1"
   ["_xfToken"] => string(8) "********"
   ["_xfConfirm"] => string(1) "1"
  }
}

Forum Sales Version: 1.3.1
PHP Version: 7.1
MySQL Version: MariaDB 10.1
 
Last edited:
Please post a screenshot of your options, I think you misconfigured something.
 
I am not sure everything was cleared upon un-installation. I tried on a fresh copy of XenForo with the same add-ons I use on the live website and that works. However, uninstallation of 1.3.0 and installation of 1.3.1 leaves me with the error posted above.

Here is the sale I attempted:

7CpASHU.png


Here are the Forum Sales options:

NMXUDHH.png


Here is the node:

7dZyACU.png
 
You don't seem to be using the latest version, the template doesn't look how they should be with the current version.
Why did you uninstall 1.3.0 to go to 1.3.1 instead of doing an upgrade ?

The problem is that there was an issue with 1.3.0 uninstall code so it's not a good thing.

I recommend you unsintall 1.3.1 and live if you have no sales and then install it again.
It should cleanup.
 
Why did you uninstall 1.3.0 to go to 1.3.1 instead of doing an upgrade ?

Initially, I had tried a direct upgrade without uninstalling 1.3.0. However, this resulted in the same issue. So, I did a full uninstall and installed 1.3.1.

I recommend you unsintall 1.3.1 and live if you have no sales and then install it again.
It should cleanup.

I have tried this and just tried it again. I am greeted with the same error as in the original post.
 
Let's try the following.

Edit the file library/XFA/ForumSales/Extends/ControllerPublic/Forum.php.
On line 169, replace :
PHP:
if (isset($currencies[$i]) && $minPrices[$i] > 0)

By:
PHP:
if (isset($currencies[$i]))

Edit the file library/XFA/ForumSales/Extends/ControllerPublic/Thread.php, do the same modification on line 598.

Clément
 

This appears to have resolved issue number one. However, I am now left with this one.

Code:
Server Error
Undefined index: xfa_fss_status

XenForo_Application::handlePhpError() in XFA/ForumSales/Extends/ControllerPublic/Thread.php at line 62
XFA_ForumSales_Extends_ControllerPublic_Thread->actionForumSaleManage() in XenForo/FrontController.php at line 351
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /var/www/runenova/forum/index.php at line 13
 
Last edited:
Seems like the product is incorrectly installed some fields are missing in the db.
Can you tell me which fields you have in the xf_thread table that starts with xfa_fss ?
 
Seems like the product is incorrectly installed some fields are missing in the db.
Can you tell me which fields you have in the xf_thread table that starts with xfa_fss ?

Live Site (The one with issues):

Code:
MariaDB [xenforo]> SHOW CREATE TABLE xf_thread ;
| xf_thread | CREATE TABLE `xf_thread` (
  `thread_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `node_id` int(10) unsigned NOT NULL,
  `title` varchar(150) NOT NULL,
  `reply_count` int(10) unsigned NOT NULL DEFAULT '0',
  `view_count` int(10) unsigned NOT NULL DEFAULT '0',
  `user_id` int(10) unsigned NOT NULL,
  `username` varchar(50) NOT NULL,
  `post_date` int(10) unsigned NOT NULL,
  `sticky` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `discussion_state` enum('visible','moderated','deleted') NOT NULL DEFAULT 'visible',
  `discussion_open` tinyint(3) unsigned NOT NULL DEFAULT '1',
  `discussion_type` varchar(25) NOT NULL DEFAULT '',
  `first_post_id` int(10) unsigned NOT NULL,
  `first_post_likes` int(10) unsigned NOT NULL DEFAULT '0',
  `last_post_date` int(10) unsigned NOT NULL,
  `last_post_id` int(10) unsigned NOT NULL,
  `last_post_user_id` int(10) unsigned NOT NULL,
  `last_post_username` varchar(50) NOT NULL,
  `prefix_id` int(10) unsigned NOT NULL DEFAULT '0',
  `tags` mediumblob NOT NULL,
  `xfa_fss_currency` varchar(3) NOT NULL DEFAULT '',
  `xfa_fss_require_address` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`thread_id`),
  KEY `node_id_last_post_date` (`node_id`,`last_post_date`),
  KEY `node_id_sticky_state_last_post` (`node_id`,`sticky`,`discussion_state`,`last_post_date`),
  KEY `last_post_date` (`last_post_date`),
  KEY `post_date` (`post_date`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 |
1 row in set (0.00 sec)

MariaDB [xenforo]>

Issue-free fresh install:
Code:
| xf_thread | CREATE TABLE `xf_thread` (
  `thread_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `node_id` int(10) unsigned NOT NULL,
  `title` varchar(150) NOT NULL,
  `reply_count` int(10) unsigned NOT NULL DEFAULT '0',
  `view_count` int(10) unsigned NOT NULL DEFAULT '0',
  `user_id` int(10) unsigned NOT NULL,
  `username` varchar(50) NOT NULL,
  `post_date` int(10) unsigned NOT NULL,
  `sticky` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `discussion_state` enum('visible','moderated','deleted') NOT NULL DEFAULT 'visible',
  `discussion_open` tinyint(3) unsigned NOT NULL DEFAULT '1',
  `discussion_type` varchar(25) NOT NULL DEFAULT '',
  `first_post_id` int(10) unsigned NOT NULL,
  `first_post_likes` int(10) unsigned NOT NULL DEFAULT '0',
  `last_post_date` int(10) unsigned NOT NULL,
  `last_post_id` int(10) unsigned NOT NULL,
  `last_post_user_id` int(10) unsigned NOT NULL,
  `last_post_username` varchar(50) NOT NULL,
  `prefix_id` int(10) unsigned NOT NULL DEFAULT '0',
  `tags` mediumblob NOT NULL,
  `xfa_fss_status` enum('nosale','forsale','onhold','sold') NOT NULL DEFAULT 'nosale',
  `xfa_fss_quantity` int(10) unsigned NOT NULL DEFAULT '1',
  `xfa_fss_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
  `xfa_fss_percentage` decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
  `xfa_fss_currency` varchar(3) NOT NULL DEFAULT '',
  `xfa_fss_paypal` varchar(250) NOT NULL DEFAULT '',
  `xfa_fss_accept_manual` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `xfa_fss_require_address` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`thread_id`),
  KEY `node_id_last_post_date` (`node_id`,`last_post_date`),
  KEY `node_id_sticky_state_last_post` (`node_id`,`sticky`,`discussion_state`,`last_post_date`),
  KEY `last_post_date` (`last_post_date`),
  KEY `post_date` (`post_date`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 |

Should I just manually add the required columns?
 
Yes exactly, the things you did with 1st uninstall/install messed up.

Run the following query:
Code:
                   ALTER TABLE xf_thread
                    ADD xfa_fss_status ENUM('nosale','forsale','onhold','sold') NOT NULL DEFAULT 'nosale',
                    ADD xfa_fss_quantity INT(10) UNSIGNED NOT NULL DEFAULT 1,
                   ADD xfa_fss_price DECIMAL( 10, 2 ) UNSIGNED NOT NULL DEFAULT  '0.00',
                   ADD xfa_fss_percentage DECIMAL( 10, 2 ) UNSIGNED NOT NULL DEFAULT  '0.00',
                    ADD xfa_fss_paypal varchar(250) NOT NULL DEFAULT '',
                    ADD xfa_fss_accept_manual TINYINT(1) UNSIGNED NOT NULL DEFAULT 0
 
Top