プロジェクト

全般

プロフィール

Vote #81237

未完了

Can't add deleted wiki Tab (404)

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Confirmed
優先度:
通常
担当者:
-
カテゴリ:
Wiki_1
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
1
version_id:
176
issue_org_id:
34634
author_id:
21060
assigned_to_id:
0
comments:
9
status_id:
9
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Confirmed]

説明

This issue is inspired by a thread in the forum (message#61955)

An user delete all wiki pages including the root page. Then he could not see the root page and could not create wiki pages any more.

The solution was to disable Wiki module and then enable it again. Then the root wiki page appeared again (may be it has been recreated on enabling wiki module).

So I think that it should be harder to delete the root wiki page or make it not erasable.
However, if it remains erasable, Wiki module should be made inactive when this page is deleted.


journals

Environment
> Redmine version 3.4.4.devel
> Ruby version 2.4.1-p111 (2017-03-22) [x86_64-linux]
> Rails version 5.1.4
> Environment production
> Database adapter Mysql2
--------------------------------------------------------------------------------
Thanks for opening this issue. I've been reading along and it already got me curious, so I already had a look at the source. I can confirm the reported behavior (at least partially, as far as I've tested). Along the way I found several other issues too.
I'm working on providing a patch.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Ivan Cenov wrote:
> An user delete all wiki pages including the root page. Then he could not see the root page and could not create wiki pages any more.

Mischa The Evil wrote:
> I can confirm the reported behavior (at least partially, as far as I've tested).

I confirm this is a problem when a whole _project wiki_ is deleted. I don't see this being a problem when deleting _single_ _wiki pages_.
@Ivan: can you too confirm this (also with the OP of message#61955)?

I have posted a patch that fixes this case as part of #34643 (file: 4. Disable the wiki module after deletion of a project wiki.). It should be applicable on its own.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
I've extracted the patch proposed by Mischa The Evil in #34643:

> * *4. Disable the wiki module after deletion of a project wiki.*
> By adding a (private) @after_destroy@ @:disable_wiki_module@ callback that disables the wiki module after deletion of a project wiki, we prevent the need to explicitly have to disable the wiki module first, before (re-)enabling the module would eventually create a new project wiki and reset the @start_page@.

I still think that it's a good ideea to inform the user that deleting the wiki root page will automatically disable the module.
--------------------------------------------------------------------------------
Marius BALTEANU wrote:
> I still think that it's a good ideea to inform the user that deleting the wiki root page will automatically disable the module.

Sure. However, now that I have had a second look at this, I think that disabling the module after the deletion is a bit of an ugly workaround. A better solution would be to implement something like a 'no data' message when a project wiki is missing and add a way for users with the required permission(s) to reinstate a new wiki by just letting them add new pages from the front-end while creating a new project wiki in the background automatically if one is not yet available. That would also take away the need for an additional notification message. What do you think?

Btw: I think you got it but to be certain, when you wrote ??...deleting the wiki root page...?? -> it's actually about deleting the project's wiki itself. I've written about this is more detail in message#61992.
--------------------------------------------------------------------------------
What do you think if we create a new empty Wiki after deletion?
--------------------------------------------------------------------------------


related_issues

relates,Closed,34643,Cleanups and fixes after Wiki tab removal from project settings (#26579)

Admin Redmine さんが3年以上前に更新

  • カテゴリWiki_1 にセット
  • 対象バージョン5.1.0_176 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0