NodeBB / nodebb-rewards-essentials

Essential Rewards Starter Pack for NodeBB
BSD 2-Clause "Simplified" License
12 stars 10 forks source link

No awards show if other award plugins are enabled. #6

Closed yariplus closed 6 years ago

yariplus commented 8 years ago

I'm having weird issues if this plugin is enabled and other plugins add rewards. After you create the reward and go back to the page. The Awards are missing for all rewards, the select has a blank option in it. (Nothing is output to the log or browser console.)

I created two new plugins that add new rewards, and they both work perfectly if both are enabled, as long this plugin isn't enabled.

I assume it's something with the templates, the amount of blank options in the award list is always equal to the amount of award inputs.

Checking ajaxify.data, and it does seem to have all the correct data in it.

psychobunny commented 8 years ago

Is the other two plugins available? I'll install and debug

yariplus commented 8 years ago

nope, I just added reward hooks to two other existing plugins. I couldn't find any other published rewards plugins. I'll make a repo for them so you can dl and test.

yariplus commented 8 years ago

https://github.com/yariplus/nbbrewardstest

Okay, the simplest possible plugins.

If I have rewards-essentials disabled and these plugins active, then I can create and save new rewards, then refresh the page, and everything is fine.

If I have rewards-essentials and these plugins active, then I can create and save new rewards, but once I refresh the page, the awards list is now gone.

psychobunny commented 8 years ago

I managed to repro this (although how to fix it is another thing..)

I noticed that if rewards-essentials was always activated from the start prior to making any rewards, this works fine. It's only if you had rewards-essentials disabled first, then create a reward, and then re-enable it

yariplus commented 8 years ago

It doesn't matter for me if I have rewards-essentials enabled first.

Creating and saving rewards always works fine.

It's only when I go back to or refresh the page that the issue happens.

wellenreiter01 commented 6 years ago

I have more or less the same issue after upgrading nodebb to v1.6.0 I did a manual upgrade and kept the existing rewards essentials module. No other changes in parallel.

Before the upgrade the module was working fine on nodebb 1.4.3 I have no other modules touching the rewards system

See also : https://community.nodebb.org/topic/11256/nodebb-rewards-essentials-after-upgrade-errorillegal-reward-no-inputs-found