Restream / redmine_tagging

Add simple tagging support to Redmine Issues/Wiki pages
114 stars 50 forks source link

√ Now it works on Redmine 4.0+ (Rails 5.2) #87

Open windviki opened 5 years ago

windviki commented 5 years ago

There's no response in this repo.

So I made a fork and adapt it to Redmine 4.0+ (Rails 5.2).

https://github.com/windviki/redmine_tagging

mrPsycho commented 5 years ago

@windviki

can you fix it:

Started PUT "/projects/android-dev/wiki/Android_Dynamic_Feature_Delivery" for 212.142.71.220 at 2019-09-26 22:42:01 +0300
Processing by WikiController#update as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"4NNCQpW/IRHdj24Pqn94En29aDINJ4zXaF465aMTxI6j7KV/Afj0QnGOAx7i3G4Dc+fMZUEtt7ZP9TdMPB2qsZg==", "content"=>{"version"=>"1", "text"=>"h1. Android Dynamic Feature Delivery\r\n\r\nhh", "comments"=>""}, "wiki_page"=>{"tags"=>"", "parent_id"=>"2089"}, "commit"=>"Save", "project_id"=>"android-dev", "id"=>"Android_Dynamic_Feature_Delivery"}
  Current user: y.n (id=13)
Completed 500 Internal Server Error in 18ms (ActiveRecord: 5.3ms)

NoMethodError (undefined method `tags_to_update=' for nil:NilClass):

plugins/redmine_tagging/lib/tagging_plugin/tagging_patches.rb:19:in `update'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'

?

windviki commented 5 years ago

A quick guess is that you dont have any wiki pages. Or you can add three lines before plugins/redmine_tagging/lib/tagging_plugin/tagging_patches.rb:19.

            if @page.nil?
              return
            end

If it works, please let me know. Thanks. I dont have the test environment now.

mrPsycho commented 5 years ago

hi,

i did it:

  module WikiControllerPatch
    module WithTags
      def update
        if params[:wiki_page]
          if tags = params[:wiki_page][:tags]
            tags = TagsHelper.from_string(tags)
            if @page.nil?
              return
            end
            @page.tags_to_update = tags
          end
        end
        super
      end
    end
  end
end

and now i cant press Save :)

mrPsycho commented 5 years ago
  module WikiControllerPatch
    module WithTags
      def update
        if params[:wiki_page]
          if tags = params[:wiki_page][:tags]
            if @page.nil?
              return
            end
            tags = TagsHelper.from_string(tags)
            @page.tags_to_update = tags
          end
        end
        super
      end
    end
  end
end

same

AnestisK commented 4 years ago

We have the same issue, And yes, there are wiki pages. Is it possible to get an update to fix this?

Diabsou commented 4 years ago

Hello,

Same here. There are wiki page also.

The error message is :

No template found for WikiController#update, rendering head :no_content

When using the inline tag option this error does not appears.

windviki commented 4 years ago

Hello,

Same here. There are wiki page also.

The error message is :

No template found for WikiController#update, rendering head :no_content

When using the inline tag option this error does not appears.

Hi, you can try my fork https://github.com/windviki/redmine_tagging

If the error still comes out, make an issue at my repo with detailed error message (full message with line numbers, etc.).

ZephOne commented 2 years ago

Hi @windviki, actually, it is not possible to make issue on your repo, it does not seem to be activated.