braini75 / msproject_import

Redmine-Plugin: XML-Task-Importer for MS Project
9 stars 11 forks source link

Random error when import file in read_cache #22

Open polargeex opened 6 years ago

polargeex commented 6 years ago

Completed 500 Internal Server Error in 429ms (ActiveRecord: 57.3ms)

NameError (uninitialized class variable @@cache in MsprojImpController Did you mean? catch): plugins/msproject_import/app/controllers/msproj_imp_controller.rb:308:in read_cache' lib/redmine/sudo_mode.rb:63:insudo_mode'

I solve it by added one line at start of read_cahe but it's dirty

def read_cache @@cache = ActiveSupport::Cache::FileStore.new(Rails.root.join('tmp','msproj_imp').to_s) @resources = @@cache.read(:resources)

Projet.zip Redmin 3.2.3 with mysql Debian 8 Rails 4.2.5.2 ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-linux]