https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292021-07-05T13:46:16ZRedmineRedmine - Defect #35531: redmine unexpected undefined local variable or method `project'" for mail handler , did you mean project_urlhttps://www.redmine.org/issues/35531?journal_id=1031332021-07-05T13:46:16ZGo MAEDA
<ul></ul><p>Could you provide <strong>full</strong> error message?</p> Redmine - Defect #35531: redmine unexpected undefined local variable or method `project'" for mail handler , did you mean project_urlhttps://www.redmine.org/issues/35531?journal_id=1031342021-07-05T13:46:35ZGo MAEDA
<ul><li><strong>Category</strong> set to <i>Email receiving</i></li></ul> Redmine - Defect #35531: redmine unexpected undefined local variable or method `project'" for mail handler , did you mean project_urlhttps://www.redmine.org/issues/35531?journal_id=1031392021-07-06T05:57:06Zanju dhiman
<ul></ul><p>Hi,</p>
<p>Exact issue is :<br />MailHandler: an unexpected error occurred when receiving email: undefined local variable or method `project' for #<MailHandler:0x0000561f96fae478><br />Did you mean? project_url</p> Redmine - Defect #35531: redmine unexpected undefined local variable or method `project'" for mail handler , did you mean project_urlhttps://www.redmine.org/issues/35531?journal_id=1031882021-07-09T08:37:19Zanju dhiman
<ul></ul><p>Any update?</p> Redmine - Defect #35531: redmine unexpected undefined local variable or method `project'" for mail handler , did you mean project_urlhttps://www.redmine.org/issues/35531?journal_id=1032152021-07-13T08:31:46ZGo MAEDA
<ul></ul><p>anju dhiman wrote:</p>
<blockquote>
<p>Exact issue is :<br />MailHandler: an unexpected error occurred when receiving email: undefined local variable or method `project' for #<MailHandler:0x0000561f96fae478><br />Did you mean? project_url</p>
</blockquote>
<p>I want to know where the error occurs. Without the information, it is difficult to figure out the cause.</p>
<p>In log/production.log file, there may be more detailed information under the error line. It looks something like the following.</p>
<pre>
app/models/issue.rb:187:in `editable?'
app/views/issues/_action_menu.html.erb:4
app/views/issues/show.html.erb:1
app/controllers/issues_controller.rb:118:in `block (2 levels) in show'
app/controllers/issues_controller.rb:110:in `show'
lib/redmine/sudo_mode.rb:61:in `sudo_mode'
</pre> Redmine - Defect #35531: redmine unexpected undefined local variable or method `project'" for mail handler , did you mean project_urlhttps://www.redmine.org/issues/35531?journal_id=1040972021-09-10T08:04:43ZMassimiliano Calipari
<ul></ul><p>Hi, I had the same issue.<br />Tring to figure out what was wrong I noticed that the issue occurred only if the email sender was a user not known for redmine.</p>
<p>My cron job settings already had the option "unknown_user=accept" so reading the documentation better I found that "Permissions have to be consistent with the chosen option. E.g. if you choose 'create', the 'Non member' role must have the 'Add issues' permission so that an issue can be created by an unknown user via email." <br />So I decided to add the "no_permission_check=1" option and the issue is gone!</p>
<p>The main issue is that the error message is misleading</p>
<pre>
Creating scope :system. Overwriting existing method Enumeration.system.
Creating scope :sorted. Overwriting existing method Group.sorted.
Creating scope :sorted. Overwriting existing method User.sorted.
MailHandler: an unexpected error occurred when receiving email: undefined local variable or method `project' for #<MailHandler:0x0000000001cb2400>
Did you mean? project_url
MailHandler: an unexpected error occurred when receiving email: undefined local variable or method `project' for #<MailHandler:0x0000000006fcee90>
Did you mean? project_url
</pre>