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

New install template overwrites current template #715

Closed
ghost opened this issue May 14, 2014 · 10 comments · Fixed by #3004
Closed

New install template overwrites current template #715

ghost opened this issue May 14, 2014 · 10 comments · Fixed by #3004

Comments

@ghost
Copy link

ghost commented May 14, 2014

I installed a template using the extension manager.
(https://www.dokuwiki.org/template:greensteel)

It was installed into the current template in use, eg dokuwiki.

In the file template.info.txt the field base has parameter : dokuwiki.
This is wrong, should be : greensteel

I don't want this kind of trouble and i think this is not meant to happen.

Maybe check for loading in existing template and ad a warning.

@splitbrain
Copy link
Collaborator

this is wrong meta data in the greensteel template. should be reported there.

@ghost
Copy link
Author

ghost commented May 14, 2014

I agree about the reporting, already posted a mail.

But i think this is important : Maybe check for loading in existing template and ad a warning.

@splitbrain splitbrain reopened this May 14, 2014
@ghost
Copy link
Author

ghost commented May 14, 2014

How can i get the Dokuwiki template back ?

@splitbrain
Copy link
Collaborator

copy it from a fresh dokuwiki download (lib/tpl/dokuwiki)

@ghost
Copy link
Author

ghost commented May 14, 2014

Copy ? This is 2014.
I used the upgrade plugin ;-)

Dokuwiki template says at status : installed, protected, bundeld, template.

What does Protected mean ?

@Klap-in
Copy link
Collaborator

Klap-in commented May 14, 2014

Copy is duplicating stuff... ;)

Protected means that you cannot remove it (usually).

@syntaxseed
Copy link
Contributor

I am currently fixing the template's meta data...

@syntaxseed
Copy link
Contributor

It is now fixed. Download url: http://syntaxseed.com/project/dokuwikithemegreensteel/download/
Thank you for notifying me about the issue!

@syntaxseed
Copy link
Contributor

Url for plugin manager: http://syntaxseed.com/downloads/dokuwikithemegreensteel.zip

@phy25
Copy link
Collaborator

phy25 commented Mar 9, 2020

The override check code is already there from the beginning:
https://github.com/splitbrain/dokuwiki/blob/b8b278447f9b09c4c227bb3197fc7694ce873ace/lib/plugins/extension/helper/extension.php#L1042-L1045

However it's not checking at all, if you manually install plugin/template by URL/upload. We can probably use the override option concept from media upload form, which is what is already in place.

phy25 added a commit that referenced this issue Mar 9, 2020
By default, on frontend $overwrite is false. Backend function installFromUpload
/ installFromURL will have a default of true to preserve existing behavior for
other API users.

installArchive now will insert a frontend msg() about not installing because of
overwrite restriction. It's not being exposed by exception, but it should be
reflected on its return array list of installed plugin.

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

Successfully merging a pull request may close this issue.

4 participants