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

Not working with img_auth.php #61

Closed
samwilson opened this issue Jun 17, 2022 · 5 comments
Closed

Not working with img_auth.php #61

samwilson opened this issue Jun 17, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@samwilson
Copy link
Owner

Bug reported at https://www.mediawiki.org/wiki/Topic:Wuj83a8ha1vvzw64

@YOUR1
Copy link
Contributor

YOUR1 commented Aug 10, 2022

I wonder if this gets fixed when #44 is merged

@akamuza
Copy link

akamuza commented Oct 9, 2023

Still not working. Version 0.12.0

@samwilson
Copy link
Owner Author

Thanks for opening #81 @YOUR1, and submitting the PR for it (#82).

However, I'm not quite sure that it's targeting the root cause of the issue. The differences between getLocalRefPath() and getFullUrl() are not going to fix this in the case of (for example) using a different storage backend (such as the AWS extension):

  • getLocalRefPath(): w/images/diagrams/Diagrams_49567a25087d4d341d3edcf3b9de2af6.cmapx
  • getFullUrl(): http://localhost/w/img_auth.php/diagrams/Diagrams_49567a25087d4d341d3edcf3b9de2af6.cmapx

In my testing it seems that this is more a configuration issue than anything that the extension can fix. The following LocalSettings.php config might be what you need:

$wgUploadPath = "$wgScriptPath/img_auth.php";
$wgImgAuthUrlPathMap['/diagrams/'] = 'mwstore://local-backend/local-public/diagrams/';

@samwilson samwilson added the bug Something isn't working label Oct 21, 2023
@akamuza
Copy link

akamuza commented Oct 26, 2023

With this config line everything works as expected.

$wgImgAuthUrlPathMap['/diagrams/'] = 'mwstore://local-backend/local-public/diagrams/';

Thank you!

@samwilson
Copy link
Owner Author

Great!

I've updated the docs at https://www.mediawiki.org/wiki/Extension:Diagrams#Installation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants