NATION

PASSWORD

Dispatch formatting - a potentially breaking change

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
[violet]
Executive Director
 
Posts: 16205
Founded: Antiquity

Dispatch formatting - a potentially breaking change

Postby [violet] » Mon Nov 02, 2020 7:28 pm

Existing dispatches may exhibit a loss of formatting in tables, as I've had to tighten up the parsing of the [ table ] Dispatch NSCode.

In particular, NSCodes that are placed inside a [ table ] but NOT also inside a [ td ] tag are no longer parsed. You can fix this by wrapping them in a [ td ] tag.

Most dispatches aren't affected, because all table content should always be inside a [ td ] tag. But sometimes it's accidentally left out. Previously that content was parsed anyway, but there's been a little rash of incidents where people exploited this in RMB posts to alter page cosmetics. So unfortunately we have to be stricter.

edit: There is a bug affecting tables inside [ spoiler ] tags, which will be fixed soon. edit 2: Now fixed. edit 3: Unfixed. edit 4: Refixed.
Last edited by [violet] on Thu Nov 05, 2020 11:38 pm, edited 5 times in total.

User avatar
The Unified Missourtama States
Diplomat
 
Posts: 670
Founded: Jul 30, 2019
Ex-Nation

Postby The Unified Missourtama States » Mon Nov 02, 2020 7:52 pm

You could also do it permanently by putting a properly formatted dispatch in the WFE.

I'm sad to see it gone though, it brought some color to sometimes often dull places :(
"The best lack all conviction, while the worst
Are full of passionate intensity.
" (W. B. Yeats)

User avatar
Confederation of TESDAI
Civilian
 
Posts: 1
Founded: Mar 20, 2017
Capitalizt

Postby Confederation of TESDAI » Mon Nov 02, 2020 8:17 pm

I seem to be having some issues, possibly a bug with a few dispatches.

https://www.nationstates.net/page=dispatch/id=1426200
https://www.nationstates.net/page=dispatch/id=1149573

I've seen the same occurence with a few other dispatches as well. These tables all contain [td] formatting so I assume they are still formatted correctly even after this update. Any help would be greatly appreciated, thank you!

User avatar
The Northern Light
Spokesperson
 
Posts: 156
Founded: Oct 10, 2014
Iron Fist Consumerists

Postby The Northern Light » Mon Nov 02, 2020 9:08 pm

It is unfortunate to see this gone, as it was the only way to:
1) produce a table header that spans all of the table's columns;
2) override the default formatting used for the first/header row of dispatch tables;
3) produce a table without a header row at all.

As a matter of fact, you can see that a lot of the dispatches currently in the "News" page are all broken. This is because a lot of these are end-of-month dispatches handing out awards to several winners listed in tables:

https://www.nationstates.net/page=dispatch/id=1455924
https://www.nationstates.net/page=dispatch/id=1455156
https://www.nationstates.net/page=dispatch/id=1455108
https://www.nationstates.net/page=dispatch/id=1455177
https://www.nationstates.net/page=dispatch/id=1455380
https://www.nationstates.net/page=dispatch/id=1455137

Would it be possible to provide some alternative mechanism for the above-mentioned functionalities? As others said, the current formatting of tables is very restrictive and monotonous, and having some way to override it would go a long way towards enabling creativity in dispatch formatting.
Home of the WADP, Planet Eras, and the Constibillocode!
Join The North Pacific!
Where the democracy is strong, the debate robust, and the rum plentiful!

Forum | Discord Chat | Citizenship | Executive Staff | North Pacific Army | World Assembly Ministry | Roleplay | Trading Cards | Handbook

User avatar
Destructive Government Economic System
Minister
 
Posts: 3470
Founded: Jun 15, 2017
Corporate Police State

Postby Destructive Government Economic System » Mon Nov 02, 2020 9:42 pm

The Northern Light wrote:Would it be possible to provide some alternative mechanism for the above-mentioned functionalities? As others said, the current formatting of tables is very restrictive and monotonous, and having some way to override it would go a long way towards enabling creativity in dispatch formatting.


If possible, I'd also like to see this be implemented.

The former system was frequently used (whether by regions or RPers) to display the artistic aspect a factbook can bring. I can understand why these new changes are in place, but perhaps another potential solution could be used that everyone would be fine with?

(On another note, in this dispatch the very last table in the last spoiler is not working, despite it being correctly formatted under the new system.)
"All I wish is to see the world burn."
-The Great Uniter and Beast of the DGES
(By the way, the DGES is a servant to DEAREST LEADER of Psychotic Dictatorships.)
Just your typical guy who wants to have fun. Don't take this nation seriously,
ever.
I DO NOT use NS stats!
Keshiland literally wrote:I would give it a no. A country that lies about how free, or how great, or how humanitarian it is can never be developed. Example, NK lies and says they are democratic and are not, the US lies and says we are free yet we incarcerate millions for a medical plant. See we are basically a larger more populated North Korea.

User avatar
Khoronzon
Spokesperson
 
Posts: 187
Founded: Jul 31, 2019
Ex-Nation

Postby Khoronzon » Tue Nov 03, 2020 12:35 am

[violet] wrote:Most dispatches aren't affected, because all table content should always be inside a [ td ] tag.

In that case, I'm wondering what happened to the table in this factbook of mine: https://www.nationstates.net/page=dispatch/id=1268069

There isn't anything in the table in the overview section that isn't enclosed in a [td] tag, as you'd see if you were to check the raw code, but the entire thing is broken nonetheless. I thought the [sidebar] could be an issue, but I took those out, then I tried removing [floatleft], but there still wasn't any difference. It's pretty late right now so I'm not in the mood to test every possible option within my code that could be causing problems, but I'd appreciate an evaluation of why it looks completely mangled despite it following the rule you mentioned.



Update: It was the spoiler at the beginning of the factbook that was messing it up - which is a pretty annoying problem, because my table was being penalised for something that wasn't in the table, and the header with the spoiler that I had going on was an aesthetic detail that I personally rather liked. I'm supposing this means I just can't put tables within spoilers right now, and I've heard complaints from others saying they can't put spoilers in tables either. Not quite gamebreaking, but an actual fix to this might be in order since this seems to be an unintended side effect of the change that was made.
Last edited by Khoronzon on Tue Nov 03, 2020 12:48 am, edited 1 time in total.
Vʏʜʜ Xsʜʀ Xsʜʀɪɴ Tʜʀʜ
Leader
Figures
Culture
Regions
Military
World
The world is no longer as it once was, moulded beyond recognition by the hands of its coming masters. Humanity is faced with a simple choice: evolve, or die.

△▽△
[all lore is under reconstruction]
▽△▽
ooc: they/them/girl/boss - notorious wumao - blowfly creature
flag homies: the celestial shurayu republic and uij, checkem out they're v based
all rise for the national anthem

中国共产党万岁

User avatar
Fallen Albali
Secretary
 
Posts: 31
Founded: Mar 07, 2018
Psychotic Dictatorship

Postby Fallen Albali » Tue Nov 03, 2020 12:45 am

If anyone's got a similar issue, apparently tables can't be inside a spoiler tag or they also break
for... some reason?
Albali has fallen and the galaxy is cold and dark.
Roulons News Network | Genocide on a galactic scale will never not be funny. | Fluttershy sucks. | You are hot chocolate with water; I am hot chocolate with milk. We are not the same.
IC year is 2044 | Tech level is basically FT with no spaceships | Population is ~12.6 million
NationStates Flag Bracket II - 1st place! | Proud Admiral of the Fuster Cluck Coalition; P5 twice in a row!

User avatar
Valentine Z
Postmaster-General
 
Posts: 13018
Founded: Nov 08, 2015
Scandinavian Liberal Paradise

Postby Valentine Z » Tue Nov 03, 2020 1:03 am

Unfortunately, a lot of the factbooks have been botched by this change, and the damage is... extreme, to say the least. Not just me, but quite a lot of people as well.

Isn't there a workaround so that the factbooks are no longer parsed on the RMB and only displayed as links? Or a regional setting so that smaller regions can use the factbook parsing to their advantage, but it can deter spam by letting Regional Officers disable factbook parsing?

This just seems out of order to botch everyone else just because of a few rulebreakers and exploits, when a few moderations and asking people to knock it off would have been fine, personally speaking.
Last edited by Valentine Z on Tue Nov 03, 2020 1:10 am, edited 1 time in total.
Val's Stuff. ♡ ^_^ ♡ For You
If you are reading my sig, I want you to have the best day ever ! You are worth it, do not let anyone get you down !
Glory to De Geweldige Sierlijke Katachtige Utopia en Zijne Autonome Machten ov Valentine Z !
(✿◠‿◠) ☆ \(^_^)/ ☆

Issues Thread Photography Stuff Project: Save F7. Stats Analysis

The Sixty! Valentian Stories! Gwen's Adventures!

• Never trouble trouble until trouble troubles you.
• World Map is a cat playing with Australia.
Let Fate sort it out.

User avatar
Innovationist Eurasia
Secretary
 
Posts: 40
Founded: Aug 21, 2020
Ex-Nation

Postby Innovationist Eurasia » Tue Nov 03, 2020 1:16 am

Well, that's unfortunate, it seems Tables can't got in spoilers like Khoronzon said. I liked the effect, but until a fix is out itll do for now.
::THE FEDERAL INNOVATIONIST STATE OF EURASIA.::
::A REVOLT AGAINST TRADITION, A REVOLUTION OF PROGRESS.::
::If it is Human Nature to act foolishly, then we shall change Human Nature itself.::

NS Stats =/= Canon.
Nation does not reflect writer's beliefs.
Feel free to TG with comments, criticism, suggestions, and additions to factbooks. I welcome and encourage it.
Factbooks are a slow WIP.

User avatar
Valentine Z
Postmaster-General
 
Posts: 13018
Founded: Nov 08, 2015
Scandinavian Liberal Paradise

Postby Valentine Z » Tue Nov 03, 2020 1:20 am

A degree of silver lining is that now I can do my own custom tables on Excel, screenshot them, and put them into the factbooks. I guess this is a good workaround as I can get!
Val's Stuff. ♡ ^_^ ♡ For You
If you are reading my sig, I want you to have the best day ever ! You are worth it, do not let anyone get you down !
Glory to De Geweldige Sierlijke Katachtige Utopia en Zijne Autonome Machten ov Valentine Z !
(✿◠‿◠) ☆ \(^_^)/ ☆

Issues Thread Photography Stuff Project: Save F7. Stats Analysis

The Sixty! Valentian Stories! Gwen's Adventures!

• Never trouble trouble until trouble troubles you.
• World Map is a cat playing with Australia.
Let Fate sort it out.

User avatar
Academia de Nocturna
Civilian
 
Posts: 1
Founded: Apr 08, 2020
Ex-Nation

Postby Academia de Nocturna » Tue Nov 03, 2020 1:50 am

Innovationist Eurasia wrote:Well, that's unfortunate, it seems Tables can't got in spoilers like Khoronzon said. I liked the effect, but until a fix is out itll do for now.

Fallen Albali wrote:If anyone's got a similar issue, apparently tables can't be inside a spoiler tag or they also break
for... some reason?

oof I'm experiencing this, everything seems to be properly formatted and in [ td ] tags in this dispatch

https://www.nationstates.net/page=dispatch/id=1386939

but the tables aren't working because they're in spoilers, hopefully it could be fixed soon

User avatar
Tahrik
Lobbyist
 
Posts: 14
Founded: Apr 24, 2020
Ex-Nation

Postby Tahrik » Tue Nov 03, 2020 1:53 am

Ok thats cool but i still don't know how to use the tables
"at 11:41, 23 September 2020 Tahrikian Government was overthrown and reorganized into the Second Republic of Tahrik, There will be reforms to ensure the safety and security of the people, Our army will protect our country until October 1, but gradually democracy will be achieved during the presidential election on October 2, 2020"
We are now a monarchy

User avatar
Merni
Ambassador
 
Posts: 1800
Founded: May 03, 2016
Democratic Socialists

Postby Merni » Tue Nov 03, 2020 3:08 am

Tahrik wrote:Ok thats cool but i still don't know how to use the tables

See this and this. Click on the "Raw" link at the bottom right to see the code used.
2024: the year of democracy. Vote!
The Labyrinth | Donate your free time, help make free ebooks | Admins: Please let us block WACC TGs!
RIP Residency 3.5.16-18.11.21, killed by simplistic calculation
Political Compass: Economic -9.5 (Left) / Social -3.85 (Liberal)
Wrote issue 1523, GA resolutions 532 and 659
meth
When the people are being beaten with a stick, they are not much happier if it is called 'the People’s Stick.' — Mikhail Bakunin (to Karl Marx)
You're supposed to be employing the arts of diplomacy, not the ruddy great thumping sledgehammers of diplomacy. — Ardchoille
The West won the world not by the superiority of its ideas or values or religion [...] but rather by its superiority in applying organised violence. — Samuel P. Huntington (even he said that!)

User avatar
Wizlandia
Diplomat
 
Posts: 732
Founded: Nov 18, 2012
Civil Rights Lovefest

Postby Wizlandia » Tue Nov 03, 2020 3:52 am

Fallen Albali wrote:If anyone's got a similar issue, apparently tables can't be inside a spoiler tag or they also break
for... some reason?

Yeah same for me.
Last edited by Wizlandia on Tue Nov 03, 2020 3:53 am, edited 1 time in total.
光复香港,时代革命。
Constitution of Wizlandia
Wizlandia Political Parties
Pro: Classical Liberalism, Market Economy, Civil Liberties, Free Speech, Immigration, LGBT Equality, Religious Liberty, School Choice, Carbon Pricing, Free Trade, Peace Through Strength, U.S., NATO, Ukraine, Israel, Taiwan, Supreme Court of the United States
Anti: Leftism, Nationalism, Islamic Fundamentalism, Anti-Semitism, Isolationism, Eurofederalism, MAGA Movement, American Progressivism, Affirmative Action/DEI/CRT/Grievance Studies, Xi, Putin, Ali Khamenei, Maduro, Hamas

User avatar
Etoile Arcture
Chargé d'Affaires
 
Posts: 453
Founded: Mar 23, 2007
Civil Rights Lovefest

Postby Etoile Arcture » Tue Nov 03, 2020 4:22 am

The Northern Light wrote:It is unfortunate to see this gone, as it was the only way to:
1) produce a table header that spans all of the table's columns;
2) override the default formatting used for the first/header row of dispatch tables;
3) produce a table without a header row at all.

It is very unfortunate that the change has borked any Wiki style layouts in dispatches.

Valentine Z wrote:Isn't there a workaround so that the factbooks are no longer parsed on the RMB and only displayed as links? Or a regional setting so that smaller regions can use the factbook parsing to their advantage, but it can deter spam by letting Regional Officers disable factbook parsing?

Yes can this be considered as an alternative solution?
Last edited by Etoile Arcture on Tue Nov 03, 2020 9:21 am, edited 1 time in total.
Unitary Technocracy of Etoile Arcture
"Excellere Contende"
Defence Condition: 5
No railguns, no orbital lasers, no god rods, no orbital nukes, no armed satellites, no space fighters, no "I Win" button
Region: NovaAlliances: ConcordantDelian LeagueCASTLEEmbassy: Diplomatic Parc
Treaties & Agreements: Theeb Accords I & II • Dagora DoctrineKázmér DoctrineAmistad Declaration



International Organisations: International Space FederationStorefronts: Consortia

User avatar
Soleanna
Diplomat
 
Posts: 815
Founded: May 09, 2017
Inoffensive Centrist Democracy

Postby Soleanna » Tue Nov 03, 2020 9:20 am

This change has definitely broken some aspects of my dispatch templates.

Edit - Anyone who use my template(s), I've revised my code to compile with the new ruleset | Aesthetic wise nothing has changed
Last edited by Soleanna on Tue Nov 03, 2020 10:19 am, edited 1 time in total.
  • NS Stats are not used
  • Soleanna's name was derived from Sonic the Hedgehog 2006, although not much else is relative to the game, besides symbolic tributes.
  • All graphics were designed by myself, if not modified to my liking. Using my graphics requires prior consent.
  • The World Assembly is the actual tyrant here, stripping nations of their sovereign rights | ( ͝° ͜ʖ͡°)つ[WA = Tyranny]

User avatar
Whitemore
Chargé d'Affaires
 
Posts: 385
Founded: Jul 22, 2020
Ex-Nation

Postby Whitemore » Tue Nov 03, 2020 9:24 am

Look at what you did to my boys, you massacred him!
★ The Empire of Whitemore ★ - " We will reach the Gates of Heaven!"


    The remnants of Humanity set in 2601, 500 years after an alien attack on Terra forced Mankind to flee the planet.

    • Loosely based off of several sci fi anime shows, some examples are; Code Geass, Aldnoah Zero and Legend of the Galactic Heroes.

Whitemoreans whenever a new War Campaign is launched - POV: You're Whitemorean and see a alien

User avatar
The Municipalities of Antarctica
Secretary
 
Posts: 32
Founded: Apr 21, 2020
Left-wing Utopia

Postby The Municipalities of Antarctica » Tue Nov 03, 2020 9:28 am

Valentine Z wrote:Isn't there a workaround so that the factbooks are no longer parsed on the RMB and only displayed as links? Or a regional setting so that smaller regions can use the factbook parsing to their advantage, but it can deter spam by letting Regional Officers disable factbook parsing?

I'd like this work-around too. Since most of my more well-done files deeply rely on a lot of formatting that was broken by this update. My tables and some of my other formatting were damaged in this change.
It makes it nearly impossible for me to organize things now, and I can't exactly find a workaround in my formatting that won't make me unhappy about it.
~ The Stalwart Federation of Antarctic Municipalities. ~
A concoction of bureaucratic complexity, frigid weather, and occasional disasters. Managed by an Administrative Governorship and an unstable Representative Council.
Current Year: 2022 AD.
This nation does not represent my Political or personal views, not entirely. It does, however, use most NS stats. Normal canon also assumes a mostly-normal Earth.
Take everything said on this account with a grain of salt, most of it is uninformed. Also never happy with anything, constantly reworking and reformatting.
Typical activity times go from 7-9 AM to 10-12 PM MST (UTC-7). If you want me to react to you, please be aware of this timing. Proud Member of The Pacific.

User avatar
Etoile Arcture
Chargé d'Affaires
 
Posts: 453
Founded: Mar 23, 2007
Civil Rights Lovefest

Postby Etoile Arcture » Tue Nov 03, 2020 12:59 pm

Soleanna wrote:This change has definitely broken some aspects of my dispatch templates.

Edit - Anyone who use my template(s), I've revised my code to compile with the new ruleset | Aesthetic wise nothing has changed

Thank you, that's a huge help.
Unitary Technocracy of Etoile Arcture
"Excellere Contende"
Defence Condition: 5
No railguns, no orbital lasers, no god rods, no orbital nukes, no armed satellites, no space fighters, no "I Win" button
Region: NovaAlliances: ConcordantDelian LeagueCASTLEEmbassy: Diplomatic Parc
Treaties & Agreements: Theeb Accords I & II • Dagora DoctrineKázmér DoctrineAmistad Declaration



International Organisations: International Space FederationStorefronts: Consortia

User avatar
Atheris
Negotiator
 
Posts: 6412
Founded: Oct 05, 2018
Ex-Nation

Postby Atheris » Tue Nov 03, 2020 2:43 pm

...Uh...

I don't speak BBCode. I just use templates.

Will factbook templates and the like be affected?
#FreeNSGRojava
Don't talk to Moderators. Don't associate with Moderators. Don't trust moderators. Moderators lie.
NEW VISAYAN ISLANDS SHOULD RESIGN! HOLD JANNIES ACCOUNTABLE!

User avatar
Comfed
Minister
 
Posts: 2254
Founded: Apr 09, 2020
Psychotic Dictatorship

Postby Comfed » Tue Nov 03, 2020 3:43 pm

What is wrong with exploiting cosmetics on a region page? It seems like a harmless bug, unless there are less harmless examples.

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

Postby [violet] » Tue Nov 03, 2020 4:46 pm

The Northern Light wrote:Would it be possible to provide some alternative mechanism for the above-mentioned functionalities? As others said, the current formatting of tables is very restrictive and monotonous, and having some way to override it would go a long way towards enabling creativity in dispatch formatting.

Yep, I'm sure we can do something like this. Let me fix the existing issues first (e.g. tables inside spoilers) and then I can add a new tag to provide the old functionality in a safer way.

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

Postby [violet] » Tue Nov 03, 2020 4:48 pm

Comfed wrote:What is wrong with exploiting cosmetics on a region page? It seems like a harmless bug, unless there are less harmless examples.

It can be used to break page formatting in a variety of ways, including sending someone a TG that basically leaves them unable to view their telegrams. Previously moderators have dealt with these on a case-by-case basis, but it's become a bit of an epidemic, so I need to fix it properly.

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

Postby Refuge Isle » Tue Nov 03, 2020 4:51 pm

Hi,

I found discovered a bug that I believe may be as a result of these changes. I'm not sure if it's more appropriate for this to be in this thread or a separate topic, but heyyy.

It looks like when a dispatch has a live-preview inside another dispatch, but that preview is generated under a sidebar, the distance between the dispatch preview and the sidebar will be filled with a large white block if there is not text in between the two. I have created a dispatch that shows what I mean here: https://www.nationstates.net/page=dispatch/id=1456440
Last edited by Refuge Isle on Tue Nov 03, 2020 4:52 pm, edited 1 time in total.

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

Postby [violet] » Tue Nov 03, 2020 6:35 pm

The Northern Light wrote:It is unfortunate to see this gone, as it was the only way to:
1) produce a table header that spans all of the table's columns;
2) override the default formatting used for the first/header row of dispatch tables;
3) produce a table without a header row at all.

Okay I have something for you to try.

Firstly, just FYI, you can actually produce a table without a header row by setting its type to 'plain', e.g. [table=plain]

Assuming you knew that already but don't want to strip all formatting from your tables, I've added a new type 'noheader', e.g. [table=noheader], which preserves normal table styling everywhere except the first row.

I've also added support for td elements that span columns, e.g. [td=4] to have a cell span 4 columns. If you set this to a large number (e.g. 20), it should span the entire table no matter how many columns it has.

So I think you can achieve the same effect as before by using [table=noheader] and putting your header cell inside a [td=6] (or however many columns you want to span) tag.

Let me know how this goes!

Next

Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: Battadia, Dazchan, Doughworld, Eqquals, Gabrielos, Leblancroux, Norse Inuit Union, Oiriu, Sol Nations, Southland, The Kingdom of Rohan

Advertisement

Remove ads