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

Extension breaking thumbnails #5

Closed
Universal-Omega opened this issue Jun 26, 2021 · 16 comments
Closed

Extension breaking thumbnails #5

Universal-Omega opened this issue Jun 26, 2021 · 16 comments
Labels
bug Something isn't working v1.0

Comments

@Universal-Omega
Copy link
Contributor

Universal-Omega commented Jun 26, 2021

The extension is loading images as https://static.miraheze.org/test3wiki/9/9e/WebP_test.webp whereas it should be loading them as https://static.miraheze.org/test3wiki/webp/9/9e/WebP_test.webp but isn't.

https://test3.miraheze.org/wiki/File:WebP_test.png for example file description page.

Ping: @octfx

@octfx octfx added the bug Something isn't working label Jun 26, 2021
@octfx
Copy link
Owner

octfx commented Jun 26, 2021

I'll look into it

@Universal-Omega
Copy link
Contributor Author

I'll look into it

Thank you!

@octfx
Copy link
Owner

octfx commented Jun 26, 2021

I can't confirm the issue using a local 1.35.2 installation. :/
I suppose you are not using a local file repo?

Can you add more info about how the upload directory is setup and which config values you are using?
My guess is that the issue has something todo with the content being hosted on a separate domain.

@Universal-Omega
Copy link
Contributor Author

We are using 1.36.0.
https://github.com/miraheze/mw-config/blob/990546a/LocalSettings.php#L4729-L4730 is the values of wgUploadPath and wgUploadDirectory
miraheze/mw-config#3982 is the config we have set for the extension which is pulled to our testing wiki.

Our configuration can be quite complex so if you need further explanation or details I will gladly provide them. Thank you!

@octfx
Copy link
Owner

octfx commented Jun 26, 2021

Many thanks. I'll try to create a running environment using the config vars and re-check the extension!

@Universal-Omega
Copy link
Contributor Author

Images display on the develop branch, but only their png images, not webp versions. Just thought I'd mention that.

@octfx
Copy link
Owner

octfx commented Jun 27, 2021

The develop branch doesn't require setting $wgLocalFileRepo.
But I haven't looked into the wrong path issue yet

@Universal-Omega
Copy link
Contributor Author

The develop branch doesn't require setting $wgLocalFileRepo.
But I haven't looked into the wrong path issue yet

OK, thank you for looking into this. I do hope to have it resolved so that we may install the extension.

@octfx
Copy link
Owner

octfx commented Jul 3, 2021

I think I've found a possible error.
Could you try the current develop branch?

@Universal-Omega
Copy link
Contributor Author

I think I've found a possible error.
Could you try the current develop branch?

The develop branch does not break thumbnails, but webp images are not shown at all.

@octfx
Copy link
Owner

octfx commented Jul 16, 2021

Can you check if for https://test3.miraheze.org/wiki/File:WebP_test.png the following thumbs exist?

  • thumb/webp/9/9e/WebP_test.png/120px-WebP_test.webp
  • thumb/webp/9/9e/WebP_test.png/800px-WebP_test.webp
  • thumb/webp/9/9e/WebP_test.png/1200px-WebP_test.webp

When $wgThumbnailScriptPath is not set, webp thumbs will only be created if the corresponding jpg, png thumb is created through MW

Alternatively you could run the maintenance script like
php ConvertImages.php --only-thumbs --thumb-sizes 120,800,1200 --title-prefix=WebP_test --overwrite

That should create the needed webp thumbs for the file in question

@Universal-Omega
Copy link
Contributor Author

Can you check if for https://test3.miraheze.org/wiki/File:WebP_test.png the following thumbs exist?

  • thumb/webp/9/9e/WebP_test.png/120px-WebP_test.webp
  • thumb/webp/9/9e/WebP_test.png/800px-WebP_test.webp
  • thumb/webp/9/9e/WebP_test.png/1200px-WebP_test.webp

When $wgThumbnailScriptPath is not set, webp thumbs will only be created if the corresponding jpg, png thumb is created through MW

Alternatively you could run the maintenance script like
php ConvertImages.php --only-thumbs --thumb-sizes 120,800,1200 --title-prefix=WebP_test --overwrite

That should create the needed webp thumbs for the file in question

Yes, those files do exist:
https://static.miraheze.org/test3wiki/webp/9/9e/WebP_test.webp

https://static.miraheze.org/test3wiki/thumb/webp/9/9e/WebP_test.png/120px-WebP_test.webp
https://static.miraheze.org/test3wiki/thumb/webp/9/9e/WebP_test.png/800px-WebP_test.webp
https://static.miraheze.org/test3wiki/thumb/webp/9/9e/WebP_test.png/1200px-WebP_test.webp

@octfx
Copy link
Owner

octfx commented Jul 21, 2021

Hm there seems to be a fundamental path problem somewhere, this is affecting the gif issue also.

I'll have to re-check the method calls. Sadly I'm a little short on free time, so this may take some days... :/

@octfx
Copy link
Owner

octfx commented Jul 22, 2021

I've checked the paths for thumbs not using thumb.php and found two path errors while generating the thumb urls.

Further I've added debug statements to the develop branch, so if it still fails with the current commit, maybe you could provide them to me.

@Universal-Omega
Copy link
Contributor Author

Universal-Omega commented Jul 30, 2021

The develop branch does now seem to work. Thank you! Please let me know when this is live on master so that we can install it.

@octfx
Copy link
Owner

octfx commented Jan 5, 2022

@Universal-Omega better late than nerver I guess :s

I've released v1.0.0 just now. Fixed some more bugs and can report that it run stable this last year on my site!

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

No branches or pull requests

2 participants