Closed blackhase closed 2 years ago
Could you provide a bit larger chunk of the production.log, please? It is not clear where the name
method is called.
Hello, this is out from /var/www/redmine$ gem list |grep record
active_record_union (1.3.0)
activerecord (7.0.2.3, 6.1.4.7, 6.1.4.1)
activerecord-sqlserver-adapter (6.1.2.1)
kaminari-activerecord (1.2.2)
And here is complete log:
App 7474 output: [1cd26118-e2a5-4bab-bcb2-2bd52c6a24c3] ActionView::Template::Error (undefined method
name' for #<Arel::Nodes::UnionAll:0x000055e03ae7cc30 @left=#<Arel::Nodes::Grouping:0x000055e03ae7ccd0 @expr=#<Arel::Nodes::SelectStatement:0x000055e03ae7e4b8 @cores=[#<Arel::Nodes::SelectCore:0x000055e03ae7e490 @source=#<Arel::Nodes::JoinSource:0x000055e03ae7e468 @left=#<Arel::Table:0x000055e038ac2ba0 @name="dmsf_folders", @klass=DmsfFolder(id: integer, project_id: integer, dmsf_folder_id: integer, title: string, description: text, notification: boolean, user_id: integer, created_at: datetime, updated_at: datetime, deleted: integer, deleted_by_user_id: integer, system: boolean), @type_caster=#<ActiveRecord::TypeCaster::Map:0x000055e038ac2b00 @klass=DmsfFolder(id: integer, project_id: integer, dmsf_folder_id: integer, title: string, description: text, notification: boolean, user_id: integer, created_at: datetime, updated_at: datetime, deleted: integer, deleted_by_user_id: integer, system: boolean)>, @table_alias=nil>, @right=[#<Arel::Nodes::StringJoin:0x000055e03ae7e0d0 @left="LEFT JOIN users ON dmsf_folders.user_id = users.id", @right=nil>]>, @set_quantifier=nil, @optimizer_hints=nil, @projections=["\n dmsf_folders.id AS id,\n dmsf_folders.project_id AS project_id,\n CAST(NULL AS integer) AS revision_id,\n dmsf_folders.title AS title,\n NULL AS filename,\n CAST(NULL AS integer) AS size,\n dmsf_folders.updated_at AS updated,\n CAST(NULL AS integer) AS major_version,\n CAST(NULL AS integer) AS minor_version,\n CAST(NULL AS integer) AS patch_version,\n CAST(NULL AS integer) AS workflow,\n CAST(NULL AS integer) AS workflow_id,\n users.firstname AS firstname,\n users.lastname AS lastname,\n users.id AS author,\n 'folder' AS type,\n dmsf_folders.deleted AS deleted,\n 'DmsfFolder' AS customized_type,\n dmsf_folders.id AS customized_id,\n 1 AS sort"], @wheres=[#<Arel::Nodes::Grouping:0x000055e03ae7def0 @expr="1=0">], @groups=[], @havings=[], @windows=[], @comment=nil>], @orders=[], @limit=nil, @lock=nil, @offset=nil, @with=nil>>, @right=#<Arel::Nodes::Grouping:0x000055e03ae7cc80 @expr=#<Arel::Nodes::SelectStatement:0x000055e03ae7d7e8 @cores=[#<Arel::Nodes::SelectCore:0x000055e03ae7d7c0 @source=#<Arel::Nodes::JoinSource:0x000055e03ae7d798 @left=#<Arel::Table:0x000055e03b48d908 @name="projects", @klass=Project(id: integer, name: string, description: text, homepage: string, is_public: boolean, parent_id: integer, created_on: datetime, updated_on: datetime, identifier: string, status: integer, lft: integer, rgt: integer, inherit_members: boolean, default_version_id: integer, dmsf_description: text, dmsf_notification: boolean, default_assigned_to_id: integer, dmsf_act_as_attachable: integer, cp_settings: text, cp_burn: float, product_backlog_id: integer, default_issue_query_id: integer, new_ticket_message: text, enable_new_ticket_message: integer), @type_caster=#<ActiveRecord::TypeCaster::Map:0x000055e03b48d8b8 @klass=Project(id: integer, name: string, description: text, homepage: string, is_public: boolean, parent_id: integer, created_on: datetime, updated_on: datetime, identifier: string, status: integer, lft: integer, rgt: integer, inherit_members: boolean, default_version_id: integer, dmsf_description: text, dmsf_notification: boolean, default_assigned_to_id: integer, dmsf_act_as_attachable: integer, cp_settings: text, cp_burn: float, product_backlog_id: integer, default_issue_query_id: integer, new_ticket_message: text, enable_new_ticket_message: integer)>, @table_alias=nil>, @right=[]>, @set_quantifier=nil, @optimizer_hints=nil, @projections=["\n projects.id AS id,\n projects.id AS project_id,\n CAST(NULL AS integer) AS revision_id,\n projects.name AS title,\n projects.identifier AS filename,\n CAST(NULL AS integer) AS size,\n projects.updated_on AS updated,\n CAST(NULL AS integer) AS major_version,\n CAST(NULL AS integer) AS minor_version,\n CAST(NULL AS integer) AS patch_version,\n CAST(NULL AS integer) AS workflow,\n CAST(NULL AS integer) AS workflow_id,\n '' AS firstname,\n '' AS lastname,\n CAST(NULL AS integer) AS author,\n 'project' AS type,\n CAST(0 AS integer) AS deleted,\n '' as customized_type,\n 0 as customized_id,\n 0 AS sort"], @wheres=[#<Arel::Nodes::And:0x000055e03ae7d3d8 @children=[#<Arel::Nodes::Grouping:0x000055e03ae7d428 @expr="projects.status <> 9">, #<Arel::Nodes::Equality:0x000055e03ae7ebc0 @left=#<struct Arel::Attributes::Attribute relation=#<Arel::Table:0x000055e03b48d908 @name="projects", @klass=Project(id: integer, name: string, description: text, homepage: string, is_public: boolean, parent_id: integer, created_on: datetime, updated_on: datetime, identifier: string, status: integer, lft: integer, rgt: integer, inherit_members: boolean, default_version_id: integer, dmsf_description: text, dmsf_notification: boolean, default_assigned_to_id: integer, dmsf_act_as_attachable: integer, cp_settings: text, cp_burn: float, product_backlog_id: integer, default_issue_query_id: integer, new_ticket_message: text, enable_new_ticket_message: integer), @type_caster=#<ActiveRecord::TypeCaster::Map:0x000055e03b48d8b8 @klass=Project(id: integer, name: string, description: text, homepage: string, is_public: boolean, parent_id: integer, created_on: datetime, updated_on: datetime, identifier: string, status: integer, lft: integer, rgt: integer, inherit_members: boolean, default_version_id: integer, dmsf_description: text, dmsf_notification: boolean, default_assigned_to_id: integer, dmsf_act_as_attachable: integer, cp_settings: text, cp_burn: float, product_backlog_id: integer, default_issue_query_id: integer, new_ticket_message: text, enable_new_ticket_message: integer)>, @table_alias=nil>, name="parent_id">, @right=#<Arel::Nodes::BindParam:0x000055e03ae7ebe8 @value=#<ActiveRecord::Relation::QueryAttribute:0x000055e03ae7ec10 @name="parent_id", @value_before_type_cast=nil, @type=#<ActiveRecord::ConnectionAdapters::SQLServer::Type::Integer:0x000055e03bacfc58 @precision=nil, @scale=nil, @limit=4, @range=-2147483648...2147483648>, @original_attribute=nil, @value=nil, @value_for_database=nil, @_unboundable=nil>>>]>], @groups=[], @havings=[], @windows=[], @comment=nil>], @orders=[], @limit=nil, @lock=nil, @offset=nil, @with=nil>>>):
App 7474 output: [1cd26118-e2a5-4bab-bcb2-2bd52c6a24c3] 25: <% options[:offset] = dmsf_pages.offset %>
App 7474 output: [1cd26118-e2a5-4bab-bcb2-2bd52c6a24c3] 26: <% options[:limit] = dmsf_pages.per_page %>
App 7474 output: [1cd26118-e2a5-4bab-bcb2-2bd52c6a24c3] 27: <% end %>
App 7474 output: [1cd26118-e2a5-4bab-bcb2-2bd52c6a24c3] 28: <% query.dmsf_nodes(options).each do |node| %>
App 7474 output: [1cd26118-e2a5-4bab-bcb2-2bd52c6a24c3] 29: <% system = node.title =~ /^./ %>
App 7474 output: [1cd26118-e2a5-4bab-bcb2-2bd52c6a24c3] 30: <% case node.type %>
App 7474 output: [1cd26118-e2a5-4bab-bcb2-2bd52c6a24c3] 31: <% when 'project'%>
App 7474 output: [1cd26118-e2a5-4bab-bcb2-2bd52c6a24c3]
App 7474 output: [1cd26118-e2a5-4bab-bcb2-2bd52c6a24c3] plugins/redmine_dmsf/app/models/dmsf_query.rb:185:in dmsf_nodes' App 7474 output: [1cd26118-e2a5-4bab-bcb2-2bd52c6a24c3] plugins/redmine_dmsf/app/views/dmsf/_query_rows.erb:28 App 7474 output: [1cd26118-e2a5-4bab-bcb2-2bd52c6a24c3] plugins/redmine_dmsf/app/views/dmsf/_query_list.html.erb:49 App 7474 output: [1cd26118-e2a5-4bab-bcb2-2bd52c6a24c3] plugins/redmine_dmsf/app/views/dmsf/_query_list.html.erb:26 App 7474 output: [1cd26118-e2a5-4bab-bcb2-2bd52c6a24c3] plugins/redmine_dmsf/app/views/dmsf/_main.html.erb:76 App 7474 output: [1cd26118-e2a5-4bab-bcb2-2bd52c6a24c3] plugins/redmine_dmsf/app/views/dmsf/index.html.erb:25 App 7474 output: [1cd26118-e2a5-4bab-bcb2-2bd52c6a24c3] plugins/redmine_dmsf/app/controllers/dmsf_controller.rb:96:in
block (2 levels) in show'
App 7474 output: [1cd26118-e2a5-4bab-bcb2-2bd52c6a24c3] plugins/redmine_dmsf/app/controllers/dmsf_controller.rb:92:in show' App 7474 output: [1cd26118-e2a5-4bab-bcb2-2bd52c6a24c3] plugins/redmine_dmsf/app/controllers/dmsf_controller.rb:74:in
index'
App 7474 output: [1cd26118-e2a5-4bab-bcb2-2bd52c6a24c3] lib/redmine/sudo_mode.rb:61:in sudo_mode'
Regards
Hm, I've no idea where the problem could lie. Have you used previous versions of DMSF, e.g. 2.4.11? This part of code hasn't changed for several versions. Have you switched MS SQL database? I test the plugin just with MariaDB, PosgreSQL and SQLite. The union shouldn't contain any name column, there is just title column.
My previous Version was 2.4.5 on redmine 4.1.1-stable No, my production DB runs with MSSQL :(. I can't run with other DB. (IT) :(
Regards.
I seems to have nothing to do with MS SQL. I'd guess that it's something related to your configuration or data in DMS. The failure seems to be in a situation when sub-projects are listed as sub-folders in DMS. This feature was added in v2.4.6. Could you test the following scenarios:
I've just realized that MS SQL is available for Ubuntu too. As soon as the last LTS version 22.04 is supported, I will test it.
Hello, i have new Error: if select Plugins -> DMSF -> Configure I get the following error:
Processing by SettingsController#plugin as HTML Parameters: {"id"=>"redmine_dmsf"} Current user: admin (id=1) Rendered settings/plugin.html.erb within layouts/admin (Duration: 2.0ms | Allocations: 963) Rendered layout layouts/admin.html.erb (Duration: 2.2ms | Allocations: 991) Completed 500 Internal Server Error in 9ms (ActiveRecord: 2.3ms | Allocations: 2887) ActionView::Template::Error (missing interpolation argument :value in "LibreOffice's command line binary '%{value}' not available" ({:count=>nil} given)): <%= text_field_tag 'settings[office_bin]', @settings['office_bin'], size: 10 %> <% unless RedmineDmsf::Preview.office_available? %> <span class="icon icon-warning"> <small><%= l(:note_dmsf_office_bin_not_available, @settings['office_bin']) %></small> </span> <% end %> <em class="info"> lib/redmine/i18n.rb:38:in
l'
plugins/redmine_dmsf/app/views/settings/_dmsf_settings.html.erb:88
app/views/settings/plugin.html.erb:6
app/views/settings/plugin.html.erb:4
lib/redmine/sudo_mode.rb:61:in sudo_mode'
This problem was fixed in #1363.
This problem was fixed in #1363.
Thank you, i have now install devel, this Problem is solved.
But the first problem still remains. My preious Version 2.4.5 was installed with MSSQL too. And this Version have not Problem with list DMSF for Project.
How about this?
1. DMS in a project without sub-projects
2. DMS in a project with sub-projects but with the plugin's option Sub-projects as sub-folders off
3. Investigate whether the problem is related to a particular sub-project or it is a general problem by whatever sub-projec
Maybe this helps:
I have not sub-projects as DMS This option "Sub-projects as Sub-folders" are not available in Verion 2.4.5.
I testing on my Redmine - Dev Installation both States with and without "Sub-projects as Sub-folders". Unfortunately without success.
In addition, I can't access redmine settings, I get this error:
plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_ru_patch.rb:43:in all_with_resources_dmsf' plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_patch.rb:41:in
all'
app/controllers/settings_controller.rb:37:in edit' app/controllers/settings_controller.rb:32:in
index'
lib/redmine/sudo_mode.rb:61:in `sudo_mode'
Best Regards, Andy
Please post a bigger chunk of the log. The error is not present in the snippet.
Started GET "/settings" for 172.20.17.134 at 2022-06-09 12:00:56 +0200 I, [2022-06-09T12:00:56.825336 #1394] INFO -- : [d4e6766a-914b-40a3-a607-f2d82b4f2081] Processing by SettingsController#index as HTML I, [2022-06-09T12:00:56.838501 #1394] INFO -- : [d4e6766a-914b-40a3-a607-f2d82b4f2081] Current user: admin (id=1) I, [2022-06-09T12:00:56.850442 #1394] INFO -- : [d4e6766a-914b-40a3-a607-f2d82b4f2081] Completed 500 Internal Server Error in 25ms (ActiveRecord: 7.1ms | Allocations: 12945) F, [2022-06-09T12:00:56.900939 #1394] FATAL -- : [d4e6766a-914b-40a3-a607-f2d82b4f2081] SystemStackError (stack level too deep):
all' plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_ru_patch.rb:43:in
all_with_resources_dmsf'
plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_patch.rb:41:in all' plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_ru_patch.rb:43:in
all_with_resources_dmsf'
plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_patch.rb:41:in all' ........................ plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_ru_patch.rb:43:in all_with_resources_dmsf' plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_patch.rb:41:in all' app/controllers/settings_controller.rb:37:in edit' app/controllers/settings_controller.rb:32:in index' lib/redmine/sudo_mode.rb:61:in
sudo_mode'Best Regards,
This problem is related to #1364. Use the up to date devel branch.
I've installed MS SQL into a virtual machine with Ubuntu 20.04. The installation is pretty easy. Then I've spent almost a day with MS SQL command line. I must say that I have never come across a database engine so far that I won't be able to manage after one day despite reading several tutorials. E.g.:
$ sqlcmd -S localhost -U SA
Password:
1> create database redmine
2> select name from sys.databases
3>
I can run whatever command I want, the output is always empty. The SQL server's log is also empty.
Sorry, I cannot help you with MS SQL. It is far to complicated for a common developer :-(
Finally, I have succeeded with MS SQL!!! Unbelievable!!!
And, I have the same error as you: undefined method
name' for #<Arel::Nodes::UnionAll`. I will investigate it.
I have found that the problem is caused by an invalid interpretation of LIMIT and OFFSET SQL statements for MS SQL. As a workaround I simply skip limit and offset for MS SQL. So, the main view doesn't support paging. But, otherwise it should work properly. Please test the devel branch.
Hello, thank you, great work,
Document list works now.
But I still have a problem, if go to "Administration >> Settings":
Started GET "/settings" for 172.20.17.134 at 2022-06-09 12:00:56 +0200 I, [2022-06-09T12:00:56.825336 #1394] INFO -- : [d4e6766a-914b-40a3-a607-f2d82b4f2081] Processing by SettingsController#index as HTML I, [2022-06-09T12:00:56.838501 #1394] INFO -- : [d4e6766a-914b-40a3-a607-f2d82b4f2081] Current user: admin (id=1) I, [2022-06-09T12:00:56.850442 #1394] INFO -- : [d4e6766a-914b-40a3-a607-f2d82b4f2081] Completed 500 Internal Server Error in 25ms (ActiveRecord: 7.1ms | Allocations: 12945) F, [2022-06-09T12:00:56.900939 #1394] FATAL -- : [d4e6766a-914b-40a3-a607-f2d82b4f2081] SystemStackError (stack level too deep):
plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_patch.rb:41:in
all' plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_ru_patch.rb:43:in
all_with_resources_dmsf'plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_patch.rb:41:in
all' plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_ru_patch.rb:43:in
all_with_resources_dmsf' plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_patch.rb:41:inall' ........................ plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_ru_patch.rb:43:in all_with_resources_dmsf' plugins/redmine_dmsf/lib/redmine_dmsf/patches/notifiable_patch.rb:41:in all' app/controllers/settings_controller.rb:37:in edit' app/controllers/settings_controller.rb:32:in index' lib/redmine/sudo_mode.rb:61:in
sudo_mode'
Best Regards,
And now?
We will reopen it, if it doesn't work.
Hello,
i have sucessfully migrate to redmine 5.0 with your devel-3.0.1 version.
With rake migrate i have no errrors, buth i retrieve 1 Error while DMSF loading. ` Started GET "/projects/redmine-verbesserungen/dmsf" for xxx.xx.xx.xx at 2022-05-10 11:41:59 +0200 Processing by DmsfController#show as HTML Parameters: {"id"=>"redmine-verbesserungen"} Current user: admin (id=1) Rendered plugins/redmine_dmsf/app/views/dmsf/show.html.erb within layouts/base (Duration: 91.3ms | Allocations: 21728) Rendered layout layouts/base.html.erb (Duration: 91.4ms | Allocations: 21762) Completed 500 Internal Server Error in 598ms (ActiveRecord: 503.7ms | Allocations: 49793)
ActionView::Template::Error (undefined method
name' for #<Arel::Nodes::UnionAll:0x000055ba4bfa6c38
System Ubuntu Server 22.04 redmine 5.0 MSSQL 2014 DMSF: devel-3.0.1
Regards