Commons:Village pump/Technical/Archive/2024/07

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Below Commons:Copyright rules by subject matter#Toys there is a heading that isn't working, namely ==Trademarks and logos==. Can someone fix it? I wasn't able to. Jonteemil (talk) 15:30, 2 July 2024 (UTC)

✓ Done --Geohakkeri (talk) 15:42, 2 July 2024 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. Thanks. --Enhancing999 (talk) 10:19, 3 July 2024 (UTC)

I don't know why this picture looks like it was damaged. If someone knowledgeable about this can fix it, that would be for the best.--125.230.78.179 10:57, 3 July 2024 (UTC)

Let’s ping User:Sreejithk2000 as an involved admin. --Geohakkeri (talk) 11:13, 3 July 2024 (UTC)
I don't know either, but I reverted it to the old version. Yann (talk) 11:13, 3 July 2024 (UTC)
From the file history, I see that the file was overwritten at one point and I moved the overwritten file to File:HarukiKuramochi20230723-1.jpeg. I don't exactly remember how this image got corrupted though. --Sreejith K (talk) 14:09, 3 July 2024 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. --Enhancing999 (talk) 08:50, 4 July 2024 (UTC)

SVG rendering issue (Côte d'Ivoire location map.svg)

On File:Côte d'Ivoire location map.svg the preview is missing. I can download the original file and it looks fine. When I use the link of a png preview of the file, I get "Error: 500, Internal Server Error". I am not sure this is a server side bug/issue, or if something is wrong with this particular SVG file. Wimmel (talk) 17:33, 9 July 2024 (UTC)

Now I notice a similar issue on File:Lesotho location map.svg, but with this file I also get an local error when I download the original file. So it seems something is wrong with the SVG. --Wimmel (talk) 17:37, 9 July 2024 (UTC)
File:Côte d'Ivoire location map.svg did not specify its dimensions (width/height or viewBox). I added a viewBox and it displays. Glrx (talk) 23:51, 9 July 2024 (UTC)
File:Lesotho location map.svg will not display in my browser because it does not define the sodipodi namespace. Glrx (talk) 23:53, 9 July 2024 (UTC)
added sodipodi namespace and it displays. Glrx (talk) 23:58, 9 July 2024 (UTC)
Thank you! --Wimmel (talk) 16:57, 10 July 2024 (UTC)
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. --Wimmel (talk) 16:57, 10 July 2024 (UTC)

Quarry / SQL optimization - using DB indexes

I'm trying to optimize a simple SQL query for pages on commonswiki (table page) which start with a certain string (e.g. "SELECT * FROM page WHERE page_title LIKE "Stolperstein_Euskirchen%" ORDER by page_title;"). The SQL Optimizer on Toolforge tells me that this query would use filesort instead of indexes which seems to be a problem ("Query plan 1.1 is using filesort or a temporary table. This is usually an indication of an inefficient query. If you find your query is slow, try taking advantage of available indexes to avoid filesort."). The DB schema documentation tells me that there should be an index defined (key: page_name_title) on page_title and page_namespace columns. The MySQL docs tell me that i could use USE INDEX (page_name_title) to enforce using that index. If I add that clause to my query (SELECT * FROM page USE INDEX (page_name_title) WHERE page_title LIKE "Stolperstein_Euskirchen%" ORDER by page_title;), the SQL optimizer complains about a "Query error: Key 'page_name_title' doesn't exist in table 'page'". Obviously i'm doing something wrong, but what's my mistake? Fl.schmitt (talk) 09:32, 10 July 2024 (UTC)

The difference is that DB schema documentation is for production sites and toolforge replicas what you are querying when using quarry doesn't have same indexes. Also, afaik when you are running queries in replicas you are running them against filtered views and i am not sure what kind of indexes you could practically have there. However, i do not know if in commons there is people who can answer to question. The better page to ask is to ask the question in mw:Talk:Quarry or phabricator and see if Ladsgroup or somebody from wmf tech is able to answer to question howto make the query fast in point of what database replicas does internally. Question is interesting and worth to asking. --Zache (talk) 17:00, 10 July 2024 (UTC)
@Zache: Thank you for your helpful explanation! I've started a new topic on mw:Talk:Quarry. Fl.schmitt (talk) 18:00, 10 July 2024 (UTC)
The solution was easy: adding a condition on the page_namespace column solved the issue (e.g. SELECT * FROM page WHERE page_title LIKE "Stolperstein_Euskirchen%" AND page_namespace = 6 ORDER by page_title;) - query runs fast as hell now :-).
Checkmark This section is resolved and can be archived. If you disagree, replace this template with your comment. --Fl.schmitt (talk) 18:36, 10 July 2024 (UTC)
Fl.schmitt (talk) 18:36, 10 July 2024 (UTC)