communiteq / discourse-adsense

Google AdSense plugin for Discourse forum
GNU General Public License v2.0
32 stars 29 forks source link

[BUG] Restore adsense settings to default doesnt work #1

Closed takeit closed 10 years ago

takeit commented 10 years ago

Hi, restoring adsense settings to default doesnt work.

Actual situation: when my adsense settings are already set and I want to click "restore to default" button, field is restored but button "green and red" show up and when I click on "green" button to save changes it doesnt work and give me an error:

adsense

For all adsense plugin buttons it is the same, for other discourse settings its all fine so its not Discourse itself problem I believe.

I'm using latest discourse version.

communiteq commented 10 years ago

This is working correctly in our environment. Can you provide more information about the actual error you're getting? Logs maybe?

takeit commented 10 years ago

After I want to restore adsense settings or put new setting I got only error from nginx. This is error output from nginx server error.log file:

2014/01/19 23:07:22 [crit] 8338#0: *5446 connect() to unix:/var/www/discourse/tmp/sockets/thin.2.sock failed (2: No such file or directory) while connecting to upstream, client: 178.36.215.230, server: forums.awake-gaming.com, request: "POST /message-bus/d95e27baedff41098209367d721c319d/poll?dlp=t HTTP/1.1", upstream: "http://unix:/var/www/discourse/tmp/sockets/thin.2.sock:/message-bus/d95e27baedff41098209367d721c319d/poll?dlp=t", host: "forums.awake-gaming.com", referrer: "http://forums.awake-gaming.com/admin/site_settings/category/adsense_plugin"
2014/01/19 23:07:22 [crit] 8338#0: *5446 connect() to unix:/var/www/discourse/tmp/sockets/thin.3.sock failed (2: No such file or directory) while connecting to upstream, client: 178.36.215.230, server: forums.awake-gaming.com, request: "POST /message-bus/d95e27baedff41098209367d721c319d/poll?dlp=t HTTP/1.1", upstream: "http://unix:/var/www/discourse/tmp/sockets/thin.3.sock:/message-bus/d95e27baedff41098209367d721c319d/poll?dlp=t", host: "forums.awake-gaming.com", referrer: "http://forums.awake-gaming.com/admin/site_settings/category/adsense_plugin"
communiteq commented 10 years ago

Please look in log/production_errors.log within your Discourse directory.

takeit commented 10 years ago

This is the whole output from production_errors.log

[RAILS_ROOT]/vendor/bundle/ruby/2.0.0/gems/thin-1.6.1/lib/thin/runner.rb:156:in `run!'
[RAILS_ROOT]/vendor/bundle/ruby/2.0.0/gems/thin-1.6.1/bin/thin:6:in `<top (required)>'
[RAILS_ROOT]/vendor/bundle/ruby/2.0.0/bin/thin:23:in `load'
[RAILS_ROOT]/vendor/bundle/ruby/2.0.0/bin/thin:23:in `&lt;main&gt;'</backtrace>
  <message>ERROR:  duplicate key value violates unique constraint "post_timings_unique"
DETAIL:  Key (topic_id, post_number, user_id)=(146, 4, 12) already exists.
</message>
  <url>http://forums.awake-gaming.com/topics/timings</url>
  <exception-class>PG::Error</exception-class>
</hash>
communiteq commented 10 years ago

It seems like something is missing there. This is an unrelated error, but it's also incomplete. There must be more than this?

takeit commented 10 years ago

Sorry I sent you incomplete log;

Here is full one:

https://dl.dropboxusercontent.com/u/35759363/errors.log

communiteq commented 10 years ago

The last message in there is almost 5 days old... 2014-01-14T22:09:35+04:00

takeit commented 10 years ago

yeah but this is the whole log, so no idea what could be wrong.. after trying to change adsense plugin settings it doesnt give any errors in production_errors.log file but only gives those errors in nginx log file..