xiaomlove / nexusphp

A private tracker application base on NexusPHP
https://nexusphp.org
GNU General Public License v2.0
885 stars 180 forks source link

Sticky Promotion, Ajax error #168

Closed BeAristobule closed 1 year ago

BeAristobule commented 1 year ago

I have this error when I click on the label append link : sticky_error

When the promotion is ended, the bonus is not added to the placeholder. I'm on 1.8.0 and the plugin worked, but it doesn't work since the paid torrent commit adding. Do you have an idea ?

xiaomlove commented 1 year ago

More detail please.

BeAristobule commented 1 year ago

What do you need exactly ?

xiaomlove commented 1 year ago

More screenshots, more text description

BeAristobule commented 1 year ago

Here is the Nginx error.log message : `2023/03/13 19:45:19 [error] 3175154#3175154: *42511924 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function NexusPlugin\StickyPromotion\mksize() in /var/www/xxx.yyy/vendor/xiaomlove/nexusphp-sticky-promotion/src/StickyPromotionRepository.php:970 Stack trace:

0 /var/www/xxx.yyy/vendor/xiaomlove/nexusphp-sticky-promotion/src/StickyPromotionRepository.php(1065): NexusPlugin\StickyPromotion\StickyPromotionRepository->fetchParticipatorAndFormat()

1 /var/www/xxx.yyy/vendor/xiaomlove/nexusphp-sticky-promotion/src/StickyPromotionRepository.php(870): NexusPlugin\StickyPromotion\StickyPromotionRepository->doCheckout()

2 [internal function]: NexusPlugin\StickyPromotion\StickyPromotionRepository->handleAnnounce()

3 /var/www/xxx.yyy/nexus/Plugin/Hook.php(72): call_user_func_array()

4 /var/www/xxx.yyy/include/globalfunctions.php(825): Nexus\Plugin\Hook->doAction()

5 /var/www/xxx.yyy/public/announce.php(623): do_action()

6 {main}

thrown in /var/www/xxx.yyy/vendor/xiaomlove/nexusphp-sticky-promotion/src/StickyP" while reading response header from upstream, client: xx.yy.xx.yy, server: xxx.yyy, request:"GET /announce.php?authkey=32034|10009|Eapvb3&info_hash=%CC%FF%09%93%ED%7F%AEzG%F5%1E%09%D7%8Dt%A2%83%8A1%00&peer_id=-lt0D80-%11pk%E7%A2%60%CDH%EE%216%17&key=39ddf432&compact=1&port=45002&uploaded=0&downloaded=1316821188&left=0&event=completed HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.0-fpm.sock:", host: "xxx.yyy"`

BeAristobule commented 1 year ago

The message to announce the end of the promotion is not sent and in the sticky_promotion table, the finish_type and finish_at values are NULL : image

xiaomlove commented 1 year ago

Fixed, try to update the plugin

composer update xiaomlove/nexusphp-sticky-promotion
php artisan plugin install xiaomlove/nexusphp-sticky-promotion
xiaomlove commented 1 year ago

And don't forget to update main programe to the latest commit.

xiaomlove commented 1 year ago

is the nginx error still exists?

BeAristobule commented 1 year ago

No, there are no more Nginx error. But the plugin shows the same Ajax error and the database has the same NULL values after to update main program and plugin.

xiaomlove commented 1 year ago

No changes are made to data that already exists. The error in the nginx log is more serious, and the update will fix it. As for the ajax problem you mentioned, it's not clear yet.

BeAristobule commented 1 year ago

I will try to completely remove the plugin and reinstall it from zero to check it.

BeAristobule commented 1 year ago

Nothing to do, the Ajax error remains even after a complete reinstallation of the plugin and deletion of the tables.

xiaomlove commented 1 year ago

How can you do appends when it disappears after the promotion is over?

xiaomlove commented 1 year ago

You elaborate on the steps to reproduce and how I have to operate to be able to see the problem.

BeAristobule commented 1 year ago

The error appears during the promotion, not after. You just need to click on the participators link in the torrent details to see the error.

xiaomlove commented 1 year ago

There are other people who have reported the same problem, check the log shows that the user was physically deleted, the problem caused by this cause has been fixed, you can try to update the main program and plugin to the latest commit to see if there is still a problem. The main problem is the provision of error logs.