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

This fixes an error occuring when an extension wants to install mime.… #5

Closed
wants to merge 1 commit into from

Conversation

mgla
Copy link
Contributor

@mgla mgla commented Sep 22, 2015

This fixes an error occuring during installation when an extension tries to install data/mime.types.

The Package.pm probably needs some additional work, as the data directory is hardcoded and there are quite a lot of corner cases to be dealt with (e.g. we probably do not want an extension to overwrite .htpasswd, but a .changes file might be valid).

@mgla
Copy link
Contributor Author

mgla commented Sep 23, 2015

An extensions that has data/mime.types in its MANIFEST fails installation (e.g. with tools/configure) with the following message:

Use of uninitialized value $web in concatenation (.) or string at /var/www/foswiki/lib/Foswiki/Configure/Package.pm line 958.
Use of uninitialized value $topic in concatenation (.) or string at /var/www/foswiki/lib/Foswiki/Configure/Package.pm line 958.
Use of uninitialized value $tweb in concatenation (.) or string at /var/www/foswiki/lib/Foswiki/Configure/Package.pm line 958.
Use of uninitialized value $ttopic in concatenation (.) or string at /var/www/foswiki/lib/Foswiki/Configure/Package.pm line 958.
Use of uninitialized value in string eq at /var/www/foswiki/lib/Foswiki/Meta.pm line 2077.
Use of uninitialized value in concatenation (.) or string at /var/www/foswiki/lib/Foswiki/Meta.pm line 2077.
Use of uninitialized value in concatenation (.) or string at /var/www/foswiki/lib/Foswiki/Meta.pm line 2077.
Unable to save topic  - web  does not exist at /var/www/foswiki/lib/Foswiki/Meta.pm line 2077.

This fails because _getMappedWebTopic gets called for anything in data, but not anything in data is a wiki topic. This worked in Foswiki 1.1.9.

@MichaelDaum
Copy link
Member

@mgla to get more attention on what you do here, please open a ticket on http://foswiki.org/Tasks/WebHome. Otherwise this is in danger of getting lost. Thanks anyway :)

@mgla
Copy link
Contributor Author

mgla commented Sep 23, 2015

@gac410
Copy link
Member

gac410 commented Sep 25, 2015

Thanks for the suggested fix. As you pointed out, the fix needed to be a bit more generic, and not keyed to a single filename. And it was a great suggestion that no extension be allowed to install .htpasswd, and that goes for .htaccess as well. So I'm checking in a different fix along with unit tests to validate the change.

@gac410 gac410 closed this Sep 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants