[DBTech] DragonByte Credits

[DBTech] DragonByte Credits [Paid] 5.0.3

No permission to buy ($14.95)
After upgrading to the 3.0.0b6 i had this error, after reuploading the files i have a blank page (site & acp).
I cant modify my config.ini file to have addons disabled because i have the addon 'Enable Debug From Admin Home' installed.
The server uses MySQL 5.6.29

Server Error

Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS shop_2, user.dbtech_credits_credits AS credits_1 ,xfa_blog.last_entry ' at line 6

  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 753
  5. Zend_Db_Adapter_Abstract->fetchRow() in XenForo/Model/User.php at line 446
  6. XenForo_Model_User->getUserById() in XenForo/Model/User.php at line 959
  7. XenForo_Model_User->getVisitingUserById() in XfAddOns/Blogs/Override/Model/User.php at line 21
  8. XfAddOns_Blogs_Override_Model_User->getVisitingUserById() in XenForo/Visitor.php at line 415
  9. XenForo_Visitor::setup() in XenForo/Session.php at line 419
  10. XenForo_Session::startAdminSession() in XenForo/ControllerAdmin/Abstract.php at line 48
  11. XenForo_ControllerAdmin_Abstract->_setupSession() in XenForo/Controller.php at line 306
  12. XenForo_Controller->preDispatch() in XenForo/FrontController.php at line 350
  13. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  14. XenForo_FrontController->run() in /home/***/public_html/admin.php at line 13
Is there a way for you to find the full query? There should be no such syntax error, as this is not something other users seem able to replicate.

If not, I will attempt to install that addon (assuming it's free) and try to replicate it :)

Hello @DragonByte Tech

Where is option for users to add real money in exchange for credits the forum?

Regards,
Velli.
Set up a new Purchase event, there will then be a purchase link in the navbar drop down and in the currency popup when clicking that currency :)


Fillip
 
After upgrading to the 3.0.0b6 i had this error, after reuploading the files i have a blank page (site & acp).
I cant modify my config.ini file to have addons disabled because i have the addon 'Enable Debug From Admin Home' installed.
The server uses MySQL 5.6.29
Upon further inspection, this may be caused by an incomplete upgrade to Shop. The currency table structure changed in order to facilitate future integration with Credits.

To work around this, edit /library/DBTech/Shop/XenForo/Model/User.php and find

PHP:
            if (!$currency['active'])
            {
                // Inactive currency
                continue;
            }

Add below

PHP:
            if (!isset($currency['table']) OR !$currency['table'])
            {
                // Incomplete upgrade
                continue;
            }

Let me know if this works for you :)


Fillip
 
Last edited:
Did the modification as you told but still the same.
Then i uploaded the shop 4.0.0b10 files and also still the same.
There is no way to find the full query because i cant access nothing anymore, not the forum nor the acp, only a blank page.
I will put the backup database of yesterday back and will install first the shop before the credits and see if it makes a difference.
 
Did the modification as you told but still the same.
Then i uploaded the shop 4.0.0b10 files and also still the same.
There is no way to find the full query because i cant access nothing anymore, not the forum nor the acp, only a blank page.
I will put the backup database of yesterday back and will install first the shop before the credits.
Before you do that, could you PM me with an FTP account so I can look into this @ your site?


Fillip
 
Sry did that directly after my posting here, but nothing changed, still have the blank page, send you a pm for the ftp access.
The latest files of credits and shop are uploaded.
 
The issue I saw on your site was actually 100% unrelated to Credits or Shop, the issue was that your config.php file was malformed. A ; was missing after the superAdmins definition in that file.

I've corrected this error and your site now appears to load as normal :)


Fillip
 
When i try to login at acp:

Server Error


Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS shop_2 ,xfa_blog.last_entry ,xfa_blog.blog_key ,xfa_blog.entry_c' at line 5

  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 753
  5. Zend_Db_Adapter_Abstract->fetchRow() in XenForo/Model/User.php at line 446
  6. XenForo_Model_User->getUserById() in XenForo/Model/User.php at line 945
  7. XenForo_Model_User->getFullUserById() in XenForo/Session.php at line 337
  8. XenForo_Session::getPublicSession() in XenForo/ControllerAdmin/Login.php at line 7
  9. XenForo_ControllerAdmin_Login->actionForm() in XenForo/FrontController.php at line 351
  10. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  11. XenForo_FrontController->run() in /home/***/public_html/admin.php at line 13

At main page:

An unexpected error occurred. Please try again later.
 
Att the saved errorlog at the ftp root:


[02-Apr-2016 16:14:47 UTC] PHP Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in /home/***/public_html/library/DBTech/Shop/XenForo/Model/User.php on line 34
[02-Apr-2016 19:27:59 UTC] PHP Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in /home/***/public_html/library/DBTech/Credits/XenForo/Model/User.php on line 26
 
When i try to login at acp:

Server Error


Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS shop_2 ,xfa_blog.last_entry ,xfa_blog.blog_key ,xfa_blog.entry_c' at line 5

  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 753
  5. Zend_Db_Adapter_Abstract->fetchRow() in XenForo/Model/User.php at line 446
  6. XenForo_Model_User->getUserById() in XenForo/Model/User.php at line 945
  7. XenForo_Model_User->getFullUserById() in XenForo/Session.php at line 337
  8. XenForo_Session::getPublicSession() in XenForo/ControllerAdmin/Login.php at line 7
  9. XenForo_ControllerAdmin_Login->actionForm() in XenForo/FrontController.php at line 351
  10. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  11. XenForo_FrontController->run() in /home/***/public_html/admin.php at line 13

At main page:

An unexpected error occurred. Please try again later.
I'll need an admin account to login with then, as I cannot replicate this issue anywhere and guests are not affected by this issue.


Fillip
 
Update: I've developed a new system that will hopefully prevent all such errors in the future. The product uploads will now come with a .lock file in the data directory that will be removed upon install/upgrade (server permissions permitting), and a notice displayed in the front-end when there's a pending upgrade.

When there's a pending upgrade, all event listeners will be soft disabled (e.g. they will still show up as enabled in the ACP, but they will exit out before they perform any action).

This system has been applied to upcoming versions of all three of our recent XenForo products; DragonByte Shout, DragonByte Shop and DragonByte Credits.


Fillip
 
hmmm, it looks like i'm your worst costumer :cautious:

-When clicking at the 'Repair Cache' it sends me back to the 'Event Management'
-When manually adding credits to a member with '0' credits it will be set again to '0' when the page reloads at the acp.
 
  • Like
Reactions: RDR
hmmm, it looks like i'm your worst costumer :cautious:

-When clicking at the 'Repair Cache' it sends me back to the 'Event Management'
-When manually adding credits to a member with '0' credits it will be set again to '0' when the page reloads at the acp.
I have these issues as well... hopefully it'll be easier to track down now that it isn't just my isolated instance
 
Update: The Manage Users interface is working as intended. You were lacking an Adjust event, which the Manage Users interface depends on. I will update the Manage Users interface to automatically generate relevant Adjust events if they have not already been created.


Fillip
 
I have these issues as well... hopefully it'll be easier to track down now that it isn't just my isolated instance

At the 'Event Management' select 'Event Trigger' select 'Adjust' and save without changing any value in it.
That is what i did see that DragonByte Tech did.
 
At the 'Event Management' select 'Event Trigger' select 'Adjust' and save without changing any value in it.
That is what i did see that DragonByte Tech did.
There is one change needed, Affected Participant needs to be set to Receiving User.

Any incorrect configuration of existing Adjust events will be corrected by the check.


Fillip
 
Top Bottom