NATION

PASSWORD

SVG nation flags

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.

Advertisement

Remove ads

User avatar
Refuge Isle
Technical Moderator
 
Posts: 1904
Founded: Dec 14, 2018
Left-wing Utopia

Postby Refuge Isle » Sat Jun 25, 2022 12:39 pm

Trotterdam wrote:As for why this one SVG file in particular has the problem when other flags seem to be fine, I'm not sure, but a cursory examination made me notice the suspicious fact that the SVG file has a "viewBox" but no "width" or "height".

That would be my fault.

User avatar
Tinhampton
Postmaster-General
 
Posts: 13705
Founded: Oct 05, 2016
Civil Rights Lovefest

Postby Tinhampton » Sat Aug 13, 2022 6:12 am

The flag of Ex appears to redirect to https://www.nationstates.net/images/flags/default.svg, even though the actual default flag is located at https://www.nationstates.net/images/flags/Default.svg.
The Self-Administrative City of TINHAMPTON (pop. 329,537): Saffron Howard, Mayor (UCP); Alexander Smith, WA Delegate-Ambassador

Authorships & co-authorships: SC#250, SC#251, Issue #1115, SC#267, GA#484, GA#491, GA#533, GA#540, GA#549, SC#356, GA#559, GA#562, GA#567, GA#578, SC#374, GA#582, SC#375, GA#589, GA#590, SC#382, SC#385*, GA#597, GA#607, SC#415, GA#647, GA#656, GA#664, GA#671, GA#674, GA#675, GA#677, GA#680, Issue #1580, GA#682, GA#683, GA#684, GA#692, GA#693, GA#715
The rest of my CV: Cup of Harmony 73 champions; Philosopher-Queen of Sophia; *author of the most popular SC Res. ever; anti-NPO cabalist in good standing; 48yo Tory woman w/Asperger's; Cambridge graduate ~ currently reading The World by Simon Sebag Montefiore


User avatar
[violet]
Executive Director
 
Posts: 16207
Founded: Antiquity

Postby [violet] » Mon Aug 15, 2022 4:19 pm

There's some kind of tool trying to found new nations but not quite getting it right. There are quite a lot of new nations like this.

It may also be someone handcrafting URLs and getting parts wrong. If it's a tool, it probably isn't compliant with current HTML Script Rules.

I'll do some backend work to tidy this up and prevent more cases.

User avatar
Tinhampton
Postmaster-General
 
Posts: 13705
Founded: Oct 05, 2016
Civil Rights Lovefest

Postby Tinhampton » Tue Aug 16, 2022 3:06 pm

Also, the flag of Novella Islands displays correctly in the sidebar but not at all at the top of the page in Century - although rather interestingly, it displays both times on Rift and at the top of the page in Antiquity (which has no sidebar).
Last edited by Tinhampton on Tue Aug 16, 2022 3:06 pm, edited 1 time in total.
The Self-Administrative City of TINHAMPTON (pop. 329,537): Saffron Howard, Mayor (UCP); Alexander Smith, WA Delegate-Ambassador

Authorships & co-authorships: SC#250, SC#251, Issue #1115, SC#267, GA#484, GA#491, GA#533, GA#540, GA#549, SC#356, GA#559, GA#562, GA#567, GA#578, SC#374, GA#582, SC#375, GA#589, GA#590, SC#382, SC#385*, GA#597, GA#607, SC#415, GA#647, GA#656, GA#664, GA#671, GA#674, GA#675, GA#677, GA#680, Issue #1580, GA#682, GA#683, GA#684, GA#692, GA#693, GA#715
The rest of my CV: Cup of Harmony 73 champions; Philosopher-Queen of Sophia; *author of the most popular SC Res. ever; anti-NPO cabalist in good standing; 48yo Tory woman w/Asperger's; Cambridge graduate ~ currently reading The World by Simon Sebag Montefiore

User avatar
Trotterdam
Postmaster-General
 
Posts: 10545
Founded: Jan 12, 2012
Left-Leaning College State

Postby Trotterdam » Tue Aug 16, 2022 3:56 pm

Tinhampton wrote:Also, the flag of Novella Islands displays correctly in the sidebar but not at all at the top of the page in Century - although rather interestingly, it displays both times on Rift and at the top of the page in Antiquity (which has no sidebar).
It's the usual case of not properly setting width and height. That seems to be behind the majority of SVG problems...

User avatar
[violet]
Executive Director
 
Posts: 16207
Founded: Antiquity

Postby [violet] » Tue Aug 16, 2022 5:59 pm

Fixed Century theme on nation page to properly display user-uploaded SVGs missing heights/widths.

User avatar
SherpDaWerp
Technical Moderator
 
Posts: 1897
Founded: Mar 02, 2016
Benevolent Dictatorship

Postby SherpDaWerp » Tue Aug 16, 2022 10:45 pm

[violet] wrote:Fixed Century theme on nation page to properly display user-uploaded SVGs missing heights/widths.

Much appreciated, [v].
Became an editor on 18/01/23 techie on 29/01/24

Rampant statistical speculation from before then is entirely unofficial

User avatar
Podium
Lobbyist
 
Posts: 20
Founded: Mar 07, 2019
Civil Rights Lovefest

Postby Podium » Sun Nov 13, 2022 1:50 pm

I've been trying to reformat my flag in anticipation of S3's full release so that the whole thing fits in the card, but whenever I submit the file in question (which is just my normal SVG flag rotated 90 degrees counterclockwise, which totals a whopping 879 bytes (4KB on disk) according to my laptop), I get this error message:
Code: Select all
"The SVG image you're uploading wasn't able to be safely compressed. Images that use advanced SVG features (such as animation or scripting) cannot be used as flags."

Scouring the forums has been as helpful as a pool noodle in ancient Roman gladiatorial combat, so I've attached a paste of the raw SVG data below - I'd greatly appreciate it if someone could help me out, preferably before the option to inscribe S3 cards is removed. Cheers.
https://pastebin.com/mkwUJnXV

Dungeon Master, Social Disaster.

Author of Issue #1257

TWP | ADHD

Est. 2003



User avatar
Frisbeeteria
Senior Game Moderator
 
Posts: 27796
Founded: Dec 16, 2003
Capitalizt

Postby Frisbeeteria » Sun Nov 13, 2022 5:26 pm

Podium wrote: my normal SVG flag rotated 90 degrees

A quick Google shows multiple conversion / cropping / resizing utilities to convert SVG files to other image formats. You're aiming for a predictable aspect ratio of 280 by 360 pixels. Can't you do that, inscribe the card, and just reload your SVG flag?

User avatar
Racoda
Technical Moderator
 
Posts: 579
Founded: Aug 12, 2014
Democratic Socialists

Postby Racoda » Sun Nov 13, 2022 6:06 pm

Podium wrote:I've been trying to reformat my flag in anticipation of S3's full release so that the whole thing fits in the card, but whenever I submit the file in question (which is just my normal SVG flag rotated 90 degrees counterclockwise, which totals a whopping 879 bytes (4KB on disk) according to my laptop), I get this error message:
Code: Select all
"The SVG image you're uploading wasn't able to be safely compressed. Images that use advanced SVG features (such as animation or scripting) cannot be used as flags."

Scouring the forums has been as helpful as a pool noodle in ancient Roman gladiatorial combat, so I've attached a paste of the raw SVG data below - I'd greatly appreciate it if someone could help me out, preferably before the option to inscribe S3 cards is removed. Cheers.
https://pastebin.com/mkwUJnXV

I couldn't get it to work with the code you provided, so I instead downloaded your current image from NS and rotated it in Inkscape. Seems to work: https://www.nationstates.net/nation=preento

Acting as a player unless accompagnied by mod action or reddish text
Any pronouns

User avatar
[violet]
Executive Director
 
Posts: 16207
Founded: Antiquity

Postby [violet] » Sun Nov 13, 2022 6:25 pm

The SVG parser is failing because your image sets some colors to "null." It will work if you remove those stroke tags, or specify a valid color.

User avatar
Trotterdam
Postmaster-General
 
Posts: 10545
Founded: Jan 12, 2012
Left-Leaning College State

Postby Trotterdam » Sun Nov 13, 2022 7:10 pm

The correct name for the don't-draw-anything "color" in SVG is "none", not "null". None is in fact the default value for stroke (but not fill), so you could also just omit it.

Previous

Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: No registered users

Advertisement

Remove ads