プロジェクト

全般

プロフィール

Vote #81517

未完了

redmine unexpected undefined local variable or method `project'" for mail handler , did you mean project_url

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Email receiving_29
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
29
version_id:
0
issue_org_id:
35531
author_id:
517334
assigned_to_id:
0
comments:
6
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
160
ステータス-->[New]

説明

Hi,

I am getting an error on Redmine while reading a particular email, error is :
Redmine unexpected undefined local variable or method `project'" for mail handler, did you mean project_url?

Email is getting read but it's not creating tickets in Redmine.

Could you guys please help us?


journals

Could you provide *full* error message?
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Hi,

Exact issue is :
MailHandler: an unexpected error occurred when receiving email: undefined local variable or method `project' for #<MailHandler:0x0000561f96fae478>
Did you mean? project_url

--------------------------------------------------------------------------------
Any update?
--------------------------------------------------------------------------------
anju dhiman wrote:
> Exact issue is :
> MailHandler: an unexpected error occurred when receiving email: undefined local variable or method `project' for #<MailHandler:0x0000561f96fae478>
> Did you mean? project_url

I want to know where the error occurs. Without the information, it is difficult to figure out the cause.

In log/production.log file, there may be more detailed information under the error line. It looks something like the following.

<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>

--------------------------------------------------------------------------------
Hi, I had the same issue.
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.

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."
So I decided to add the "no_permission_check=1" option and the issue is gone!

The main issue is that the error message is misleading

<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>

--------------------------------------------------------------------------------

Admin Redmine さんが約2年前に更新

  • カテゴリEmail receiving_29 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0