Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Critical] Short display of "Setup a new system" on public site while restarting Zammad! #389

Closed
jacotec opened this issue Nov 9, 2016 · 7 comments
Labels

Comments

@jacotec
Copy link

jacotec commented Nov 9, 2016

I think that one is critical!

I did a restart of Zammad (service zammad restart) on the server. Meanwhile I've reloaded my webbrowser with the Zammad page continuously. For a while I got "Service not available / 503" messages back, but suddenly it showed me the initial setup screen where I could choose beween setting up a new system and importing data!

A few seconds later the system was back with its data.

Question: If someone else hits the website exactly in that time window after a server restart, when the initial setup message appears (obviously because Zammad has not yet completely loaded its database) - can anyone destroy the installation by hitting "Set up as new system"?

@martini martini added the bug label Nov 9, 2016
@martini
Copy link
Collaborator

martini commented Nov 9, 2016

Hi @jacotec

Normally this page is shown if "Setting.get('system_init_done')" is false. So after finishing the setup this is always true. I guess it's related with your 500er in #214 (comment)

-> So basically Setting.get('system_init_done') is false (because of 500er). -> Waiting for feedback in issue#214 to improved this screen too.

-Martin

@martini
Copy link
Collaborator

martini commented Nov 9, 2016

PS: It's better to discuss there 500er error her. It's more related to this issue.

@jacotec
Copy link
Author

jacotec commented Nov 9, 2016

Hi @martini :

OK, there is some hope. I've tried to reproduce this on my test VM (with intact database), the start is pretty fast here and I can't see this issue.

I've got the feeling that the "Ticket.destroy_all" did really bad things to my database. The service restart takes ages here, also seeing the mentioned problem with the "Set up as new" window.

Log is in the #214 thread.

Any way to repair my database? Or flatten it and restart from scratch? :-(

@martini
Copy link
Collaborator

martini commented Nov 9, 2016

I guess it's easy this time. Did you change a mail template?

I, [2016-11-09T20:35:12.833736 #2384]  INFO -- : Completed 500 Internal Server Error in 213ms (Views: 1.8ms | ActiveRecord: 22.5ms)
F, [2016-11-09T20:35:12.834705 #2384] FATAL -- : 
SyntaxError ((erb):1: syntax error, unexpected tIDENTIFIER, expecting ')'
...rbout.concat(( d "<a href="http://ticket.id" title="http://t...
...                               ^
(erb):1: unknown regexp options - tckt
(erb):1: syntax error, unexpected tIDENTIFIER, expecting ')'
...="http://ticket.id" title="http://ticket.id" target="_blank"...
...                               ^
(erb):1: unknown regexp options - tckt
(erb):1: syntax error, unexpected tIDENTIFIER, expecting ')'
...ttp://ticket.id" target="_blank">ticket.id</a>", true ).to_s...
...                               ^):
  lib/notification_factory/template.rb:11:in `render'
  lib/notification_factory/mailer.rb:224:in `template'
  app/models/ticket.rb:750:in `block in perform_changes'
  app/models/ticket.rb:672:in `perform_changes'
  app/models/transaction/trigger.rb:119:in `block (2 levels) in perform'
  app/models/transaction.rb:12:in `block in execute'
  app/models/transaction.rb:10:in `execute'
  app/models/transaction/trigger.rb:118:in `block in perform'
  app/models/transaction/trigger.rb:44:in `perform'
  app/models/observer/transaction.rb:56:in `execute_singel_backend'
  app/models/observer/transaction.rb:42:in `block (3 levels) in perform'
  app/models/observer/transaction.rb:41:in `each'
  app/models/observer/transaction.rb:41:in `block (2 levels) in perform'
  app/models/observer/transaction.rb:38:in `each'
  app/models/observer/transaction.rb:38:in `block in perform'
  app/models/observer/transaction.rb:37:in `each'
  app/models/observer/transaction.rb:37:in `perform'
  app/models/observer/transaction.rb:14:in `commit'
  app/controllers/application_controller.rb:69:in `transaction_end'

@jacotec
Copy link
Author

jacotec commented Nov 9, 2016

@martini : Yap, I did. Just translations from English to German, see my #385 ... seems to be a different bug.

OK, disabling the mail trigger and it's working again. Blimey!

I'll post the ticket text in #385 as this makes more sense ... can you have a look what should be wrong here?

Seems we can close this one here ... happy that it wasn't the ticket delete :-)

@jacotec jacotec closed this as completed Nov 9, 2016
@martini
Copy link
Collaborator

martini commented Nov 9, 2016

Oh. So it wan't a notification .erb file in file system, it was a trigger based notification added/edited via admin interface?

@jacotec
Copy link
Author

jacotec commented Nov 9, 2016

Nope, no file hacking with .erb's (thank you for mentioning where I can change the system mail template) ... it was an official text change via the GUI of a trigger text. No idea why the change killed the notification, I've filed bug #385 this afternoon on this. I saw this also previously on my test system. As I did not change any variables I honestly have no idea what the system does not like.

zammad-sync pushed a commit that referenced this issue Mar 3, 2017
…d issue #395 - Auto-assign ticket owner on first reply. Fixed issue #389 - Trigger action "Owner" -> "not changed" needed. Fixed issue #298 - trigger "set to public" requested.
zammad-sync pushed a commit that referenced this issue Mar 3, 2017
…d issue #395 - Auto-assign ticket owner on first reply. Fixed issue #389 - Trigger action "Owner" -> "not changed" needed. Fixed issue #298 - trigger "set to public" requested.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants