Project

General

Profile

Actions

Defect #41513

closed

Error after update to revision 23153

Added by ChunChang (Nagaharu) Lo 10 days ago. Updated 10 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Text formatting
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

passenger cannot load redmine application, error:

[ E 2024-10-21 02:52:11.4112 1580055/Tu age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /var/www/html/redmine: The application encountered the following error: uninitialized constant Redmine::WikiFormatting::Markdown

HtmlParser = Redmine::WikiFormatting::Markdown::HtmlParser
^^^^^^^^ (NameError)
Error ID: c0956157
Error details saved to: /tmp/passenger-error-nvMmDh.html

Related issues

Related to Redmine - Feature #40149: Drop deprecated Redcarpet based Markdown formatterClosedGo MAEDA

Actions
Actions #1

Updated by ChunChang (Nagaharu) Lo 10 days ago

BTW, the migration DB script ran successfully.

== 20241007144951 ChangeTextFormattingFromMarkdownToCommonMark: migrating =====
== 20241007144951 ChangeTextFormattingFromMarkdownToCommonMark: migrated (0.0189s)
Actions #2

Updated by ChunChang (Nagaharu) Lo 10 days ago

[shortie@centos8 config]$ mysql -u redmine -p redmine
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 382605
Server version: 10.5.26-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [redmine]> select * from settings where name = 'text_formatting';
+----+-----------------+-------------+---------------------+
| id | name            | value       | updated_on          |
+----+-----------------+-------------+---------------------+
|  9 | text_formatting | common_mark | 2022-11-07 09:54:31 |
+----+-----------------+-------------+---------------------+
1 row in set (0.001 sec)

MariaDB [redmine]>

Actions #3

Updated by ChunChang (Nagaharu) Lo 10 days ago

Error Details:

uninitialized constant Redmine::WikiFormatting::Markdown

      HtmlParser = Redmine::WikiFormatting::Markdown::HtmlParser
                                          ^^^^^^^^^^ (NameError)
  /var/www/html/redmine/lib/redmine/wiki_formatting/common_mark/html_parser.rb:23:in `<module:CommonMark>'
  /var/www/html/redmine/lib/redmine/wiki_formatting/common_mark/html_parser.rb:22:in `<module:WikiFormatting>'
  /var/www/html/redmine/lib/redmine/wiki_formatting/common_mark/html_parser.rb:21:in `<module:Redmine>'
  /var/www/html/redmine/lib/redmine/wiki_formatting/common_mark/html_parser.rb:20:in `<top (required)>'
  <internal:/usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb>:37:in `require'
  <internal:/usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb>:37:in `require'
  /usr/share/gems/gems/zeitwerk-2.6.16/lib/zeitwerk/kernel.rb:26:in `require'
  /usr/share/gems/gems/zeitwerk-2.6.16/lib/zeitwerk/cref.rb:91:in `const_get'
  /usr/share/gems/gems/zeitwerk-2.6.16/lib/zeitwerk/cref.rb:91:in `get'
  /usr/share/gems/gems/zeitwerk-2.6.16/lib/zeitwerk/loader/eager_load.rb:173:in `block in actual_eager_load_dir'
  /usr/share/gems/gems/zeitwerk-2.6.16/lib/zeitwerk/loader/helpers.rb:47:in `block in ls'
  /usr/share/gems/gems/zeitwerk-2.6.16/lib/zeitwerk/loader/helpers.rb:25:in `each'
  /usr/share/gems/gems/zeitwerk-2.6.16/lib/zeitwerk/loader/helpers.rb:25:in `ls'
  /usr/share/gems/gems/zeitwerk-2.6.16/lib/zeitwerk/loader/eager_load.rb:168:in `actual_eager_load_dir'
  /usr/share/gems/gems/zeitwerk-2.6.16/lib/zeitwerk/loader/eager_load.rb:17:in `block (2 levels) in eager_load'
  /usr/share/gems/gems/zeitwerk-2.6.16/lib/zeitwerk/loader/eager_load.rb:16:in `each'
  /usr/share/gems/gems/zeitwerk-2.6.16/lib/zeitwerk/loader/eager_load.rb:16:in `block in eager_load'
  /usr/share/gems/gems/zeitwerk-2.6.16/lib/zeitwerk/loader/eager_load.rb:10:in `synchronize'
  /usr/share/gems/gems/zeitwerk-2.6.16/lib/zeitwerk/loader/eager_load.rb:10:in `eager_load'
  /usr/share/gems/gems/zeitwerk-2.6.16/lib/zeitwerk/loader.rb:413:in `block in eager_load_all'
  /usr/share/gems/gems/zeitwerk-2.6.16/lib/zeitwerk/loader.rb:411:in `each'
  /usr/share/gems/gems/zeitwerk-2.6.16/lib/zeitwerk/loader.rb:411:in `eager_load_all'
  /usr/share/gems/gems/railties-7.2.1.1/lib/rails/application/finisher.rb:80:in `block in <module:Finisher>'
  /usr/share/gems/gems/railties-7.2.1.1/lib/rails/initializable.rb:32:in `instance_exec'
  /usr/share/gems/gems/railties-7.2.1.1/lib/rails/initializable.rb:32:in `run'
  /usr/share/gems/gems/railties-7.2.1.1/lib/rails/initializable.rb:61:in `block in run_initializers'
  /usr/share/ruby/tsort.rb:228:in `block in tsort_each'
  /usr/share/ruby/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
  /usr/share/ruby/tsort.rb:431:in `each_strongly_connected_component_from'
  /usr/share/ruby/tsort.rb:349:in `block in each_strongly_connected_component'
  /usr/share/ruby/tsort.rb:347:in `each'
  /usr/share/ruby/tsort.rb:347:in `call'
  /usr/share/ruby/tsort.rb:347:in `each_strongly_connected_component'
  /usr/share/ruby/tsort.rb:226:in `tsort_each'
  /usr/share/ruby/tsort.rb:205:in `tsort_each'
  /usr/share/gems/gems/railties-7.2.1.1/lib/rails/initializable.rb:60:in `run_initializers'
  /usr/share/gems/gems/railties-7.2.1.1/lib/rails/application.rb:435:in `initialize!'
  /var/www/html/redmine/config/environment.rb:16:in `<top (required)>'
  config.ru:3:in `require_relative'
  config.ru:3:in `block in <main>'
  /usr/share/gems/gems/rack-3.1.7/lib/rack/builder.rb:124:in `instance_eval'
  /usr/share/gems/gems/rack-3.1.7/lib/rack/builder.rb:124:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /usr/local/share/gems/gems/passenger-6.0.20/src/helper-scripts/rack-preloader.rb:101:in `eval'
  /usr/local/share/gems/gems/passenger-6.0.20/src/helper-scripts/rack-preloader.rb:101:in `preload_app'
  /usr/local/share/gems/gems/passenger-6.0.20/src/helper-scripts/rack-preloader.rb:189:in `block in <module:App>'
  /usr/local/share/gems/gems/passenger-6.0.20/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:399:in `run_block_and_record_step_progress'
  /usr/local/share/gems/gems/passenger-6.0.20/src/helper-scripts/rack-preloader.rb:188:in `<module:App>'
  /usr/local/share/gems/gems/passenger-6.0.20/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /usr/local/share/gems/gems/passenger-6.0.20/src/helper-scripts/rack-preloader.rb:29:in `<main>'
Actions #4

Updated by Go MAEDA 10 days ago

  • Status changed from New to Confirmed
  • Assignee set to Go MAEDA
Actions #5

Updated by Go MAEDA 10 days ago

  • Related to Feature #40149: Drop deprecated Redcarpet based Markdown formatter added
Actions #6

Updated by Go MAEDA 10 days ago

  • Category set to Text formatting
  • Status changed from Confirmed to Closed
  • Resolution set to Fixed

Sorry for your inconvenience and thank you for quickly reporting the issue. I have fixed the error in r23154.

The error occurred because the code was referencing Redmine::WikiFormatting::Markdown::HtmlParser, which was removed along with the Redcarpet-based Markdown formatter. In the production environment, this caused a missing constant error.

To fix this, I ported the implementation of HtmlParser class from lib/redmine/wiki_formatting/markdown/html_parser.rb deleted in r23153 (#40149).

Actions

Also available in: Atom PDF