• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

XenTrader 2.1.0 User Feedback System

Status
Not open for further replies.
SOS! can not add a tip is not in Latin characters. Is the author has not provided such an option? Not all the people in the world of writing Latin

now latin1_swedish_ci !!!suxx!!!
needs to be done utf8_general_ci

author big minus for hindsight​
 
solution:


ALTER TABLE `my_forum`.`xentrader_feedback` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
and more
 
Non working delete feedback.

Division by zero
  1. XenForo_Application::handlePhpError() in XenTrader/DataWriter/Feedback.php at line 85
  2. XenTrader_DataWriter_Feedback->_postDelete() in XenForo/DataWriter.php at line 1645
  3. XenForo_DataWriter->delete() in XenTrader/ControllerPublic/Feedback.php at line 146
  4. XenTrader_ControllerPublic_Feedback->actionDelete() in XenForo/FrontController.php at line 310
  5. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  6. XenForo_FrontController->run() in /www/greyforum.ru/index.php at line 13

Yeah I'm getting the same thing. Is there a temp fix for this?

I have to disable it on my forum until this is resolved.
 
SOS! can not add a tip is not in Latin characters. Is the author has not provided such an option? Not all the people in the world of writing Latin
author big minus for hindsight

Not all people in the world are releasing and supporting an addon free of charge either... we are aware the delete feedback error and already commented it will be fixed in a future release, if you are unhappy with the speed of releases I suggest you look at buying this addon.
 
Character set was due to my dev environment settings being setup wrong since I have had to re-install everything. I have forgotten little thing like that. Division by 0 I will look at now and the feedback only being deleted in one spot is simply impossible.
 
hi slavik, currently i disabled xenTrader, but the link to send feedback stays on the profile popup (when you click on a username). its away as soon as you uncheck xentrader on the addon page maybe it should disapear as soon as you decide to not activate xentrader via the xentrader options.

keep up the good work, small donation is on its way.
 
On import, i'm getting this:
Undefined index: query
  1. XenForo_Application::handlePhpError() in XenTrader/Importer/ITrader.php at line 310
  2. XenTrader_Importer_ITrader->_convertUrlToThreadId() in XenTrader/Importer/ITrader.php at line 241
  3. XenTrader_Importer_ITrader->stepFeedback() in XenForo/Importer/Abstract.php at line 77
  4. XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 166
  5. XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 218
  6. XenForo_ControllerAdmin_Import->_startStep() in XenForo/ControllerAdmin/Import.php at line 161
  7. XenForo_ControllerAdmin_Import->actionStartStep() in XenForo/FrontController.php at line 310
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  9. XenForo_FrontController->run() in /***********************************/forums/admin.php at line 13
 
Feedback edits are broken.

You can keep editing positive feedback and someone will get +1 positive for every edit. Editing negative feedback will give -1 for every edit while neutral will decrease a person's rating.

This needs to be fixed before anyone uses this plugin unless you disable edits. Can anyone help fix this?

Never mind, I managed to fix this by reversing the edit (adding 1 when edited to negative feedback, and subtracting 1 when edited to positive).
 
Yeah I'm getting the same thing. Is there a temp fix for this?

I have to disable it on my forum until this is resolved.

I figured out how to fix it. Edit library\xentrader\datawriter\feedback.php

Go to line 85 and change the line to

PHP:
$dw->set('rating', max(0, ($user['positive'] - $user['negative']) / max(1, $user['positive'] + $user['neutral'] + $user['negative']) * 100));

This ensures that the user's total feedback is at least 1 so you don't divide by 0.
 
Robbo said:
I haven't had time to get back to the bug reports. Do you get any errors or anything? What version of vbull are you coming from? Is there much feedback to report and does it appear to work for a while?

Can you quote this message and reply to it in the thread so if any issues are sorted other people will see them?

VB 3.8. On import, i'm getting this:
Undefined index: query
  1. XenForo_Application::handlePhpError() in XenTrader/Importer/ITrader.php at line 310
  2. XenTrader_Importer_ITrader->_convertUrlToThreadId() in XenTrader/Importer/ITrader.php at line 241
  3. XenTrader_Importer_ITrader->stepFeedback() in XenForo/Importer/Abstract.php at line 77
  4. XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 166
  5. XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 218
  6. XenForo_ControllerAdmin_Import->_startStep() in XenForo/ControllerAdmin/Import.php at line 161
  7. XenForo_ControllerAdmin_Import->actionStartStep() in XenForo/FrontController.php at line 310
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  9. XenForo_FrontController->run() in /***********************************/forums/admin.php at line 13
 
hi slavik, currently i disabled xenTrader, but the link to send feedback stays on the profile popup (when you click on a username). its away as soon as you uncheck xentrader on the addon page maybe it should disapear as soon as you decide to not activate xentrader via the xentrader options.

keep up the good work, small donation is on its way.
This is a design flaw from the old mod that I have unfortunely used here. The new version will be using my XenPlus library (yet to be released) which will add this option to the options how it is now but when using it it will toggle the mod active or deactive as a whole addon instead of a permission how it is now.

I think I've fixed the special characters problem.
So having a quick look at the code it was a fault in PHP?
Code:
// for php 5.3.5 and under
                    mb_ereg('<!DOCTYPE.+?>\s*<html><body>(.+)</body></html>', $doc->saveHTML(), $match);
                    $content = $match[0];

                    // for php 5.3.6+
                    //$nodes = $doc->getElementsByTagName('body');
                    //$content = $doc->saveXML($nodes->item(0));
Did you find this solution from an article or bug report? Or just know it from experience? I would like to read up on it and get it into a release asap.

I figured out how to fix it. Edit library\xentrader\datawriter\feedback.php

Go to line 85 and change the line to

PHP:
$dw->set('rating', max(0, ($user['positive'] - $user['negative']) / max(1, $user['positive'] + $user['neutral'] + $user['negative']) * 100));

This ensures that the user's total feedback is at least 1 so you don't divide by 0.
Lack of testing on my part here. Thought I solved all division by 0 errors but apparently not. Thanks, will be in next release.

VB 3.8. On import, i'm getting this:
Undefined index: query
  1. XenForo_Application::handlePhpError() in XenTrader/Importer/ITrader.php at line 310
  2. XenTrader_Importer_ITrader->_convertUrlToThreadId() in XenTrader/Importer/ITrader.php at line 241
  3. XenTrader_Importer_ITrader->stepFeedback() in XenForo/Importer/Abstract.php at line 77
  4. XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 166
  5. XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 218
  6. XenForo_ControllerAdmin_Import->_startStep() in XenForo/ControllerAdmin/Import.php at line 161
  7. XenForo_ControllerAdmin_Import->actionStartStep() in XenForo/FrontController.php at line 310
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  9. XenForo_FrontController->run() in /***********************************/forums/admin.php at line 13
Does the old mod you are using require URLs? This is part of the importer I couldn't test very well.

Try this. In file library/XenTrader/Importer/ITrader.php.

Find on line 302 (might be wrong line on my dev version but should at least be close).
PHP:
if (!$parsed || empty($parsed['scheme']) || $parsed['scheme'] != 'http')
And replace with...
PHP:
if (!$parsed || empty($parsed['scheme']) || $parsed['scheme'] != 'http' || !isset($parsed['query'])
 
Does the old mod you are using require URLs? This is part of the importer I couldn't test very well.

Try this. In file library/XenTrader/Importer/ITrader.php.

Find on line 302 (might be wrong line on my dev version but should at least be close).
PHP:
if (!$parsed || empty($parsed['scheme']) || $parsed['scheme'] != 'http')
And replace with...
PHP:
if (!$parsed || empty($parsed['scheme']) || $parsed['scheme'] != 'http' || !isset($parsed['query'])

This crashes the importer.
Parse error: syntax error, unexpected T_RETURN in /home/****/****/forums/library/XenTrader/Importer/ITrader.php on line 303
 
missed a ')'. Put one at the end of that line.

if (!$parsed || empty($parsed['scheme']) || $parsed['scheme'] != 'http' || !isset($parsed['query']))
 
So having a quick look at the code it was a fault in PHP?
Code:
// for php 5.3.5 and under
                    mb_ereg('<!DOCTYPE.+?>\s*<html><body>(.+)</body></html>', $doc->saveHTML(), $match);
                    $content = $match[0];

                    // for php 5.3.6+
                    //$nodes = $doc->getElementsByTagName('body');
                    //$content = $doc->saveXML($nodes->item(0));
Did you find this solution from an article or bug report? Or just know it from experience? I would like to read up on it and get it into a release asap.

Lack of testing on my part here. Thought I solved all division by 0 errors but apparently not.

The code that you pasted here is for getting rid of the extra doctype, html, and body tags that saveHTML adds. Update: I've updated my upload to change $match[0] to $match[1].

PHP:
$dom = new Zend_Dom_Query(mb_convert_encoding($content, 'html-entities', 'utf-8'));

I fixed the bug by trial and error. I don't know who's fault it is. This is the important part that gets rid of some garbage characters.

Also, I'm very very surprised that no one here except me has mentioned you can give someone infinite feedback points by editing or deleting feedback. This makes the plugin totally unusable.

I have already fixed this. I didn't release it yet because
  • I don't think anyone is actually using this addon since no one but me has complained about this bug.
  • My fix seems inefficient because it has to recalculate the person's reputation for every reputation edit or submit.
    (but it might be the only way)
 
There are bits in the works, however both Robbo and I have been exceptionally busy so the addon has suffered a little.

The good news is, once 1.1 is out we plan an update to incoorperate a lot of new functionality, as well as general bug fixes. However I will talk with Robbo about possibly doing a small maintainance release in the meantime.
 
It should work with 1.1. If it doesn't a small patch will be released to create compatability. There is also an update to take advantage of 1.1 features and add some extra features to XenTrader. This will come 'soon'.
 
Status
Not open for further replies.
Top Bottom