Fix these adplugin issues for better user experience

AI-generated summary

Fix these adplugin issues for better user experience

iamjdk reported two issues with the adplugin. Firstly, the adplugin settings are not working properly, and secondly, the adplugin script is loaded even when not in use.

To fix the first issue, iamjdk suggested replacing the plugin’s URL with https://example.com/admin/site_settings/category/all_results?filter=plugin%3Adiscourse-adplugin.

joffreyjaffeux acknowledged the issues and nbianca submitted a fix for the first issue in a GitHub pull request. joffreyjaffeux also mentioned that nbianca is working on a fix for the second issue, which is expected to be available next week.

iamjdk thanked joffreyjaffeux for addressing the issues, which will improve the user experience for many users.

I have seen 2 issues in the discourse forum. one in the ad plugin settings and second in adplugin performance. Let’s me explain here.

#1 adpplugin settings not working

When I visit setttings >> plugins and click on discourse-adplugin settings button, I see this this “no result found”

You can fix this with showing all results. For this, please replace this url in plugin.

Replace this

https://example.com/admin/site_settings/category/plugins?filter=plugin%3Adiscourse-adplugin

with this url.

https://example.com/admin/site_settings/category/all_results?filter=plugin%3Adiscourse-adplugin

This is good for better user experience and no need to click on left navigation options.

#2. Adplugin script loaded when not using plugin.

I see that when I have not used adplugin and have not placed any ads via this plugin, than why this plugin’s script loaded.

I see your other plugin and they have enable/disable option. Please add this setting in plugin otherwise stop script to load by default, it should be load only when plugin is used.

image

I hope you will take good action about it,

Thanks!

@iamjdk Yes this is things we should fix, I will look at this.

Thanks dear, it will be good for me and many other users. :blush:

@nbianca is working on a fix for this, most likely available next week or so.

Will be fix by FIX: defines an enabled_site_setting · discourse/discourse-adplugin@75fb2bf · GitHub

Thanks for report.

I submitted a fix here.