Project

General

Profile

ActionView::Template::Error ((<unknown>): block sequence entries are not allowed in this context at line 1 column 6): redmine 2.3

Added by Martin Hollerweger over 10 years ago

Serveral reminde sites are not working for me:
Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.
If you are the Redmine administrator, check your log files for details about the error.

Looking in log/production.log

Processing by IssuesController#index as HTML
Parameters: {"set_filter"=>"1", "tracker_id"=>"2", "project_id"=>"musyssbv"}
Current user: (id=2) CHANGED
Rendered queries/_filters.html.erb (17.2ms)
Rendered queries/_columns.html.erb (3.2ms)
Rendered issues/index.html.erb within layouts/base (26.8ms)
Completed 500 Internal Server Error in 187ms
ActionView::Template::Error ((<unknown>): block sequence entries are not allowed in this context at line 1 column 6):
4: <%= label_tag "available_columns", l(:description_available_columns) >
5: <br />
6: <
= select_tag 'available_columns',
7: options_for_select(query_available_inline_columns_options(query)),
8: :multiple => true, :size => 10, :style => "width:150px",
9: :ondblclick => "moveOptions(this.form.available_columns, this.form.selected_columns);" %>
10: </td>
app/models/setting.rb:95:in `value'
app/models/setting.rb:108:in `[]'
app/models/setting.rb:137:in `issue_list_default_columns'
app/models/issue_query.rb:222:in `default_columns_names'
app/models/query.rb:390:in `columns'
app/helpers/queries_helper.rb:65:in `query_available_inline_columns_options'
app/views/queries/_columns.html.erb:7:in `_app_views_queries
_columns_html_erb___2947399916117338286_69861136455720'
app/helpers/queries_helper.rb:74:in `render_query_columns_selection'
app/views/issues/index.html.erb:27:in `block in app_views_issues_index_html_erb_1342629872768940164_58247400'
app/views/issues/index.html.erb:11:in `_app_views_issues_index_html_erb__1342629872768940164_58247400'
app/controllers/issues_controller.rb:83:in `block (2 levels) in index'
app/controllers/issues_controller.rb:82:in `index'_

I couldn't find anything related to this error.

This sites don't work:
/settings
/projects/musyssbv/issues
/projects/musyssbv/issues?*
/users/*

I checkt the file permission:
mkdir -p tmp tmp/pdf public/plugin_assets
sudo chown -R www-data:www-data files log tmp public/plugin_assets
sudo chmod -R 755 files log tmp public/plugin_assets

And also checked that passenger executes redmine with www-data with htop: (multiple entries deleted)
22001 www-data 20 0 516M 116M 4660 S 0.0 2.9 0:00.00 Passenger RackApp: /usr/local/share/redmine
14382 www-data 20 0 382M 91372 1680 S 0.0 2.2 0:00.00 Passenger RackApp: /usr/local/share/redmine
11868 nobody 20 0 206M 4160 3216 S 0.0 0.1 0:00.00 PassengerLoggingAgent
11859 root 20 0 756M 3332 2356 S 0.0 0.1 0:00.01 PassengerHelperAgent
11854 root 20 0 215M 1948 1644 S 0.0 0.0 0:00.00 PassengerWatchdog

I also executed:
rake db:migrate RAILS_ENV=production
rake redmine:plugins:migrate RAILS_ENV=production

I have migrated from redmine 1.3x to 2.3

RAILS_ENV=YOUR_ENVIRONMENT script/about
/usr/local/share/redmine# RAILS_ENV=YOUR_ENVIRONMENT script/about
: No such file or directory

but it is there:
/usr/local/share/redmine# ls -l script/
total 8
-rw-rwxrwx 1 www-data root 173 Sep 14 08:48 about
-rw-rwxrwx 1 www-data root 301 Sep 14 08:48 rails

/admin/info
Administrator-Kennwort geändert True
Verzeichnis für Dateien beschreibbar True
Verzeichnis für Plugin-Assets beschreibbar True
RMagick verfügbar (optional) True
Environment:
Redmine version 2.3.3.stable
Ruby version 1.9.3-p448 (2013-06-27) [x86_64-linux]
Rails version 3.2.13
Environment production
Database adapter Mysql2
Redmine plugins:
redmine_contacts 3.2.5-light
redmine_contacts_helpdesk 2.2.5-pro
redmine_mylyn_connector 2.8.2.stable

Version Infos
Debian Version Testing up to date
mysql Ver 14.14 Distrib 5.5.31, for debian-linux-gnu (x86_64) using readline 6.2
Server version: Apache/2.4.6 (Debian)

Can anybody help me?


Replies (17)

RE: ActionView::Template::Error ((<unknown>): block sequence entries are not allowed in this context at line 1 column 6): redmine 2.3 - Added by Martin Hollerweger over 10 years ago

Thank you for the quick response

I use these plugin as mentioned:

Redmine plugins:
redmine_contacts 3.2.5-light
redmine_contacts_helpdesk 2.2.5-pro
redmine_mylyn_connector 2.8.2.stable

What is a 3rd party template? I have a fresh redmine 2.3.3 installation with just these three templates plugins.

I just deinstalled all plugins, same error.
(rake redmine:plugins:migrate NAME=plugin_name VERSION=0 RAILS_ENV=production
removed /plugins/*
restarted apache2)

I also tried the sites in a new project...

RE: ActionView::Template::Error ((<unknown>): block sequence entries are not allowed in this context at line 1 column 6): redmine 2.3 - Added by Jan Niggemann (redmine.org team member) over 10 years ago

Martin Hollerweger wrote:

Thank you for the quick response
I use these plugin as mentioned:

Oh, sorry, didn't read carefully enough.

What is a 3rd party template? I have a fresh redmine 2.3.3 installation with just these three templates.

Redmine ships with some default templates, but there are 3rd party templates available.

I just deinstalled all plugins, same error.

Try to delete custom queries IIRC there was a thread about that somewhere here...

RE: ActionView::Template::Error ((<unknown>): block sequence entries are not allowed in this context at line 1 column 6): redmine 2.3 - Added by Ivan Cenov over 10 years ago

Just an idea: Try

ruby script/rails server webrick -e production
This may help you distinguish where the problem comes from...

RE: ActionView::Template::Error ((<unknown>): block sequence entries are not allowed in this context at line 1 column 6): redmine 2.3 - Added by Martin Hollerweger over 10 years ago

Try to delete custom queries IIRC there was a thread about that somewhere here...

I assume that custom_queries stored in the database under queries. Which is empty. I can't view them in redmine because the issue site doesn't work.

ruby script/rails server webrick -e production

Can a safely start a webrick server on a production system with apache?

RE: ActionView::Template::Error ((<unknown>): block sequence entries are not allowed in this context at line 1 column 6): redmine 2.3 - Added by Ivan Cenov over 10 years ago

Martin Hollerweger wrote:

Can a safely start a webrick server on a production system with apache?

You can test if it works in a webserver at http://your_redmine_path:3000 This way you try to access Redmine before Apache.

RE: ActionView::Template::Error ((<unknown>): block sequence entries are not allowed in this context at line 1 column 6): redmine 2.3 - Added by Martin Hollerweger over 10 years ago

Same error with webrick.

Started GET "/projects/musyssbv/issues?set_filter=1&tracker_id=1" for 84.115.124.204 at 2013-10-02 10:01:05 +0200
Processing by IssuesController#index as HTML
Parameters: {"set_filter"=>"1", "tracker_id"=>"1", "project_id"=>"musyssbv"}
Current user: (id=2)
Rendered queries/_filters.html.erb (22.7ms)
Rendered queries/_columns.html.erb (2.4ms)
Rendered issues/index.html.erb within layouts/base (26.9ms)
Completed 500 Internal Server Error in 164ms

ActionView::Template::Error ((<unknown>): block sequence entries are not allowed in this context at line 1 column 6):
4: <%= label_tag "available_columns", l(:description_available_columns) >
5: <br />
6: <
= select_tag 'available_columns',
7: options_for_select(query_available_inline_columns_options(query)),
8: :multiple => true, :size => 10, :style => "width:150px",
9: :ondblclick => "moveOptions(this.form.available_columns, this.form.selected_columns);" %>
10: </td>
app/models/setting.rb:95:in `value'
app/models/setting.rb:108:in `[]'
app/models/setting.rb:137:in `issue_list_default_columns'
app/models/issue_query.rb:222:in `default_columns_names'
app/models/query.rb:390:in `columns'
app/helpers/queries_helper.rb:65:in `query_available_inline_columns_options'
app/views/queries/_columns.html.erb:7:in `_app_views_queries__columns_html_erb__1615850981875249908_70152490051880'
app/helpers/queries_helper.rb:74:in `render_query_columns_selection'
app/views/issues/index.html.erb:27:in `block in app_views_issues_index_html_erb__4105684497036261364_56009060'
app/views/issues/index.html.erb:11:in `_app_views_issues_index_html_erb___4105684497036261364_56009060'
app/controllers/issues_controller.rb:83:in `block (2 levels) in index'
app/controllers/issues_controller.rb:82:in `index'

I also get this warining on sites that work:
[2013-10-02 10:00:16] WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true

Source code error? - Added by Martin Hollerweger over 10 years ago

For me it seems like a source code error and that the code can't be interpreted by ruby.
Could it be that this configurations is incompatible?
Redmine version 2.3.3.stable
Ruby version 1.9.3-p448 (2013-06-27) [x86_64-linux]
Rails version 3.2.13

RE: Source code error? - Added by Jan Niggemann (redmine.org team member) over 10 years ago

Martin Hollerweger wrote:

For me it seems like a source code error and that the code can't be interpreted by ruby.
Could it be that this configurations is incompatible?
Redmine version 2.3.3.stable
Ruby version 1.9.3-p448 (2013-06-27) [x86_64-linux]
Rails version 3.2.13

AAIK that should be all right...

block sequence entries are not allowed in this context

Isn't this a YAML-related error? On the other hand, I'd have expected the error message being from Psych (the YAML parser) instead ActionView...

RE: Source code error? - Added by Martin Hollerweger over 10 years ago

Jan Niggemann wrote:

block sequence entries are not allowed in this context

Isn't this a YAML-related error? On the other hand, I'd have expected the error message being from Psych (the YAML parser) instead ActionView...

Okay, I'm really not familiar with Ruby,Psych, ...

Where is the YAML stored? In the database?

Could it be that the migration didn't went right from the old database to the new?
(rake db:migrate RAILS_ENV=production
rake redmine:plugins:migrate RAILS_ENV=production)

RE: Source code error? - Added by Jan Niggemann (redmine.org team member) over 10 years ago

Martin Hollerweger wrote:

Okay, I'm really not familiar with Ruby,Psych, ...

I'm not proficient enough either, that was more a guess...

RE: ActionView::Template::Error ((<unknown>): block sequence entries are not allowed in this context at line 1 column 6): redmine 2.3 - Added by Martin Hollerweger over 10 years ago

Jan Niggemann wrote:

Martin Hollerweger wrote:

Okay, I'm really not familiar with Ruby,Psych, ...

I'm not proficient enough either, that was more a guess...

Seems like a good guess, i looked into app/models/setting.rb:95:in `value'

_def value
v = read_attribute(:value)
  1. Unserialize serialized settings
    *v = YAML::load(v) if @available_settings[name]['serialized'] && v.is_a?(String)*
    v = v.to_sym if
    @available_settings[name]['format'] == 'symbol' && !v.blank?
    v
    end_

I search for the matching files: grep -r "label_tag \"available_columns\"" ./
./app/views/queries/_columns.html.erb: <%= label_tag "available_columns", l(:description_available_columns) >
./plugins/redmine_contacts/app/views/contacts_queries/_columns.html.erb: <
= label_tag "available_columns", l(:description_available_columns) %>

The exect matching file is ./app/views/queries/_columns.html.erb:
<td style="padding-left:0">
<%= label_tag "available_columns", l(:description_available_columns) >
<br />
<
= select_tag 'available_columns',
options_for_select(query_available_inline_columns_options(query)),
:multiple => true, :size => 10, :style => "width:150px",
:ondblclick => "moveOptions(this.form.available_columns, this.form.selected_columns);" %>
</td>

Ivan Cenov wrote:

Google pointed to http://blogs.perl.org/users/brian_d_foy/2010/06/block-sequence-entries-are-not-allowed-in-this-context.html may you find something useful there. YAML files are not stored in theh database.

Thank you Ivan, it looks like i have the exact opposite problem. New standard in files and old parser.
<%= select_tag 'available_columns',

I changed this line to that, which leads to another error:
<%= select_tag available_columns,

ActionView::Template::Error (undefined local variable or method `available_columns' for #<#<Class:0x007fb180d5e538>:0x007fb180d6a298>):

Double quotes: Old Error:
<%= label_tag "available_columns"
ActionView::Template::Error ((<unknown>): block sequence entries are not allowed in this context at line 1 column 6):

Strange, when i remove available_columns then i get the same error (I also tried select instead of select_tag and ()):
<%= select( options_for_select(query_available_inline_columns_options(query)),
:multiple => true, :size => 10, :style => "width:150px",
:ondblclick => "moveOptions(this.form.available_columns, this.form.selected_columns);") %>

Could it be that the query is the Problem?
query_available_inline_columns_options(query)

RE: ActionView::Template::Error ((<unknown>): block sequence entries are not allowed in this context at line 1 column 6): redmine 2.3 - Added by Ivan Cenov over 10 years ago

You may want to try totally different approach: incremental upgrade; it will last more time, but as you can see the direct jump to 2.3.3 has took much time too.

without plugins:
1.3.x -> 1.4.x -> 2.0.x -> 2.3.x
up to 1.4.x: ruby 1.8.7 with correspondent rails;
from 2.0.x: ruby 1.9.3 with correspondent rails;

I cannot imagine something else...

RE: ActionView::Template::Error ((<unknown>): block sequence entries are not allowed in this context at line 1 column 6): redmine 2.3 - Added by Martin Hollerweger over 10 years ago

Ivan Cenov wrote:

You may want to try totally different approach: incremental upgrade; it will last more time, but as you can see the direct jump to 2.3.3 has took much time too.

without plugins:
1.3.x -> 1.4.x -> 2.0.x -> 2.3.x
up to 1.4.x: ruby 1.8.7 with correspondent rails;
from 2.0.x: ruby 1.9.3 with correspondent rails;

I cannot imagine something else...

I can't go back to ruby 1.8.7.

RE: ActionView::Template::Error ((<unknown>): block sequence entries are not allowed in this context at line 1 column 6): redmine 2.3 - Added by Martin Hollerweger over 10 years ago

I checked the last queries executed before the error occurred:

SELECT `trackers`. FROM `trackers` ORDER BY trackers.position ASC;*

'1', 'Bug', '1', '1', '1', '0'
'2', 'Feature', '1', '2', '1', '0'
'3', 'Support', '0', '3', '1', '0'
'4', 'Docu', '0', '4', '1', '0'
'5', 'Sonstiges', '0', '5', '1', '0'
'6', 'Support SMS-Abo', '0', '6', '1', '0'

SELECT `settings`. FROM `settings` WHERE `settings`.`name` = 'default_projects_tracker_ids' LIMIT 1;*

0 Rows returned

SELECT `roles`. FROM `roles` WHERE `roles`.`builtin` = 0 ORDER BY roles.position ASC;*

'4', 'Developer', '3', '1', '0', '--- \n- :manage_versions\n- :manage_categories\n- :view_issues\n- :add_issues\n- :edit_issues\n- :manage_issue_relations\n- :manage_subtasks\n- :add_issue_notes\n- :save_queries\n- :view_gantt\n- :view_calendar\n- :log_time\n- :view_time_entries\n- :comment_news\n- :view_documents\n- :view_wiki_pages\n- :view_wiki_edits\n- :edit_wiki_pages\n- :delete_wiki_pages\n- :add_messages\n- :edit_own_messages\n- :view_files\n- :manage_files\n- :browse_repository\n- :view_changesets\n- :commit_access\n', 'default'
'5', 'Reporter', '4', '1', '0', '--- \n- :add_messages\n- :edit_messages\n- :edit_own_messages\n- :view_calendar\n- :send_response\n- :view_contacts\n- :add_contacts\n- :edit_contacts\n- :add_notes\n- :delete_notes\n- :manage_contacts\n- :view_documents\n- :view_files\n- :view_gantt\n- :view_issues\n- :add_issues\n- :edit_issues\n- :add_issue_notes\n- :save_queries\n- :comment_news\n- :browse_repository\n- :view_changesets\n- :log_time\n- :view_time_entries\n', 'default'

SELECT `settings`. FROM `settings` WHERE `settings`.`name` = 'issue_list_default_columns' LIMIT 1;*

'51', 'issue_list_default_columns', '--- - tracker - status - priority - subject - assigned_to - updated_on - category - fixed_version ', '2012-03-12 15:30:48'

SELECT MAX AS max_id FROM `settings`;

'2013-09-28 02:58:00'

SELECT `users`. FROM `users` WHERE `users`.`type` IN ('User', 'AnonymousUser') AND `users`.`status` = 1 AND `users`.`id` = 2 LIMIT 1; (replaced some data with xxx)*

'2', 'xxx', 'xxx', 'xxx', 'xxx', 'xxx', '1', '1', '2013-10-06 20:51:09', 'de', NULL, NULL, '2013-09-03 17:29:13', 'User', NULL, 'only_my_events', 'xxx'

SELECT MAX AS max_id FROM `contacts_settings`;

'2013-09-28 02:20:47'

Is that a normal output?
'---' seems a little strange

Resolved, but one other Error - Added by Martin Hollerweger over 10 years ago

Yeahr, i gor it!

There was something wrong with issue_list_default_columns. I have just delete this row in the database.

SELECT `settings`. FROM `settings` WHERE `settings`.`name` = 'issue_list_default_columns' LIMIT 1;
'51', 'issue_list_default_columns', '--- - tracker - status - priority - subject - assigned_to - updated_on - category - fixed_version ', '2012-03-12 15:30:48'

All sites except one working now.

http://redmine.musys.at/users/2

Started GET "/users/2" for 129.27.239.211 at 2013-10-07 17:55:59 +0200
Processing by UsersController#show as HTML
Parameters: {"id"=>"2"}
Current user: (id=1)
Completed 500 Internal Server Error in 126ms
ArgumentError (comparison of Journal with JournalMessage failed):
lib/redmine/activity/fetcher.rb:80:in `sort!'
lib/redmine/activity/fetcher.rb:80:in `events'
app/controllers/users_controller.rb:65:in `show'

I have found a similar error:

http://www.redmine.org/issues/10836

But the solution is a little unclear:

I fixed the problem forcing in db correct date for journal events because due an import issue them were been setted as "0000-00-00" value.

I can't find journal events in my redmine db.

    (1-17/17)