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

Mod description with single apostrophe leads to "Illegal format found" error in log #1561

Closed
3TUSK opened this issue Sep 24, 2024 · 3 comments · Fixed by #1739
Closed

Mod description with single apostrophe leads to "Illegal format found" error in log #1561

3TUSK opened this issue Sep 24, 2024 · 3 comments · Fixed by #1739
Labels
triage Needs triaging and confirmation

Comments

@3TUSK
Copy link

3TUSK commented Sep 24, 2024

Minecraft Version: 1.20.5 - 1.21.1. Tested using 1.21.1.

NeoForge Version: Tested using 21.1.61; should happen on any NeoForge with version in range [20.5.0, 21.1.61]

Logs: N/A, no crashes happen

Steps to Reproduce:

  1. Create a low-code mod with only neoforge.mods.toml given below
modLoader="lowcodefml"
loaderVersion="[1,)"
license="CC0-1.0"

[[mods]] #mandatory
modId="test_description_with_single_quote"
version="1.0.0"
displayName="Test Description with Single Quote" 
description="It's regression time!"
  1. Add it to your mods directory
  2. Launch game
  3. Open Mod List screen
  4. Confirm that the low code mod is loaded by finding it on your left-hand side
  5. Click the low code mod entry to open details
  6. Find this line in your log, timestamp may vary:
[18:46:26] [Render thread/ERROR] [ne.ne.fm.i1.FMLTranslations/CORE]: Illegal format found `It's regression time!`

Description of issue:

Similar to #734, if mod description contains an apostrophe (U+0027 APOSTROPHE), ExtendedMessageFormat, which is used by FMLTranslations, will see it as unterminated quoted string and throw IllegalArgumentException.

It was fixed in #686 for 1.20.4, but the fix for 1.20.5 and onward - #851 - only covers mod name, not mod description.

This regression was attested in Argon4W/EveryXHotpot@bb5458c.

@3TUSK 3TUSK added the triage Needs triaging and confirmation label Sep 24, 2024
@Corail31
Copy link

It's still a problem even in 1.21.3.

Matyrobbrt added a commit to Matyrobbrt/NeoForge that referenced this issue Dec 4, 2024
Fixes neoforged#1561 by not formatting mod descriptions, and only querying the translation.
@neoforged-releases
Copy link

🚀 This issue has been resolved in NeoForge version 21.4.7-beta, as part of #1739.

@costantin0
Copy link

The issue is still present in the 21.1.92 version of Neoforge. Will the fix be ported to 1.21.1?
Every time a mod with a long description is selected from the menu the log gets filled with its content.

Matyrobbrt added a commit to Matyrobbrt/NeoForge that referenced this issue Jan 3, 2025
Soaryn pushed a commit to Soaryn/EnergyHandlerPR that referenced this issue Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs triaging and confirmation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants