Forked plugin removal causing issues and blank pages


(Ed Arcos) #1

Hi, I’m so sorry my first contribution to the Discourse forum is about issues we’re having. I hope I can explain myself and describe correctly what is happening to us.

After installing, running and correctly testing our installation for two weeks we decided to fork and slightly modify the discourse-adplugin to localize the “ADVERTISING” label on top of every ad displayed. Our idea was to create a new variable in which users can type on the admin the label they want to show with every banner. For example, forums in spanish can show “PUBLICIDAD”, forums in french can display “PUBLICITE” and so on. After we finish we’ll make a pull request for consideration to the official plugin.

So we installed the plugin from the forked version on our Github account. We did some tests, couldn’t seem to make it work. After a few attepts and blank pages we decided to uninstall the plugin and go back to the official one. So we could launch, later on we would try again.

We did exactly that. Deleted the clone line for our fork in the plugins section of app.yml and add the URL to the official plugin.

This is when problems started. After doing a ./launcher rebuild app our Discourse installation is just not working. Blank pages stay.

So I completely deleted the discourse-adplugin line in the plugins section of app.yml and rebuild. Discourse is still not working. Just blank pages and the loading animation.

Then I tried safe mode. Disabled all plugins. Discourse works again. Perfect. Went back to app.yml and disabled all plugins. Rebuild, but Discourse is not working again even with all plugins disabled.

Upon further inspection I see that even though I disabled all plugins, all configuration from the modified plugin is still there on the admin pages. It is basically the same configuration as the official ad plugin with one more user-configurable variable.

So I add the official adplugin back to app.yml and rebuild. Still getting blank pages on the Discourse front, and when I go to the admin section, I still see my modifications on the plugin configuration, even though I added the git clone line to the official repo (GitHub - discourse/discourse-adplugin: Official Discourse Advertising Plugin. Install & Start Serving Ads on Your Discourse Forum)

I go back to app.yml, I comment the line, save the file and rebuild. Still getting blank pages, loading animation forever and if I go to the admin section I still see Discourse lists the plugin as active and I still see all the configuration for my modified plugin, even though I deleted the clone line.

So, my question is: how can I force Discourse to download and install the current version of the adplugin and “forget” I ever installed that modified version?

Thanks for any help I can get fixing this.

PS: Yeah, I know I shouldn’t be doing development on a production install. Lesson learned.


(Joshua Rosenfeld) #2

Hey @frostydog, couple of questions:

  • When you entered safe-mode, did you also disable all site-customizations?
  • On the blank pages, is anything appearing in your browser console?
  • Is there anything in your site logs? yoursite.com/logs

Also, for a support topic, please share a link to the forum.


(Jay Pfaffman) #3

You might just backup, rename /var/discourse, install a fresh one, copy the backup over to the new one, and restore the backup.


(Ed Arcos) #4

Yeap, exactly what I’m doing :frowning:


(Sam Saffron) #5

rebuild is all you should ever need, it will never remember anything after a rebuild, old source code is junked, new source code is cloned off GitHub

It is conceivable you

  • Fork plugin
  • Corrupt internal database using your fork
  • Move back to official plugin
  • Disasta pasta

I used conceivable here, cause you could make it happen, but very unlikely.

Blank page means errors… what are the errors? look in your rails logs.


(Ed Arcos) #6

It was probably that, after forking we fucked up something. I just backed up, reinstalled everything and ready to go. We’re in testing phase and learning how to use Discourse on a very big website with huge traffic, so this was a good thing in the sense that it is better to do something wrong now and not later when we go live :slight_smile:

Thanks a lot for your help.