Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict with Dokuwiki Blog plugin #137

Closed
pmgeuze opened this issue Feb 12, 2022 · 4 comments
Closed

Conflict with Dokuwiki Blog plugin #137

pmgeuze opened this issue Feb 12, 2022 · 4 comments
Labels

Comments

@pmgeuze
Copy link

pmgeuze commented Feb 12, 2022

Hello friends,

Thank you for a great plugin. I have noticed that when I have the Blog plugin on a page and any of the Blog entries contains a ToDo task, that when I 'check' the ToDo task that it will show checked. When I refresh the page, the ToDo item is unchecked, and that the ToDo text that marks an item as checked is instead inserted after the greater than symbol in the Blog command.

{{blog  #pmgeuze:2021-10-18>journal&fullpage}}

----

===== To Do Tasks =====

~~TODOLIST completed:no  header:firstheader~~

This text insert will then break the Blog command and does not mark the ToDo task either.

I hope that this is somehow a simple fix, but I appreciate that it may be complicated due to the nesting issue. I enjoy using your ToDo as an addition to my Journal (Blog).

@runout-at
Copy link
Collaborator

I don't use the blog plugin, so i don't know anything about its details.

Can you verify that the blog plugins isn't preventing the code change or is overwriting the change?

Did you report this issue for the blog plugin?

@runout-at
Copy link
Collaborator

If there is no further response I'll close this soon.

@einhirn
Copy link
Collaborator

einhirn commented Aug 9, 2023

It's really an edge case, but if we rework

$todoTagStartPos = $this->_strnpos($wikitext, '<todo', $index);
$todoTagEndPos = strpos($wikitext, '>', $todoTagStartPos) + 1;
we could at least prevent the impact on the blog plugin's syntax (or any other page nesting syntax). But it wouldn't fix the issue that the Todo item would be unchecked again after reload, because we have no (known) way to determine which page ID the Todo was nested from...

@pmgeuze Oh, and the workaround would be to just add a Todo at the bottom of the "main" blog page (where you put the blog plugin syntax...) because our code searches for an opening <todo and a closing > right after it. In your example there is no opening <todo so the search returns 0, and since blog plugins syntax is the first closing >, our change is applied there...

@einhirn einhirn reopened this Aug 9, 2023
@einhirn einhirn added the bug label Aug 9, 2023
@einhirn einhirn closed this as completed in db35cc3 Feb 1, 2024
einhirn added a commit that referenced this issue Feb 1, 2024
fixes #137 in part - prevents edit of parent page without todo tag
@einhirn
Copy link
Collaborator

einhirn commented Feb 1, 2024

As explained in the PR's message this fix isn't perfect but will prevent todos nested from a different page to break the page nesting them - as long as the nesting page doesn't use todos also...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants