This page showcases a bug in the Cargo extension. Auto-generated column names break upon the presence of a period.
{{#cargo_query: tables = weapons
| fields = name, CONCAT("Test1.Test2.Test3.")
| where = name = "Adamantine Longsword"
}}
name |
Test2.Test3.") |
Adamantine Longsword |
Test1.Test2.Test3. |
The behavior changes depending on whether there's a space after the period.
This one causes an error to be logged by PHP, saying the column " Test2. Test3."
couldn't be found, and the data isn't shown.
{{#cargo_query: tables = weapons
| fields = name, CONCAT("Test1. Test2. Test3.")
| where = name = "Adamantine Longsword"
}}
name |
Test2. Test3.") |
Adamantine Longsword |
|
To work around the bug, make sure to give the column a proper name:
{{#cargo_query: tables = weapons
| fields = name, CONCAT("Test1.Test2.Test3.") = test
| where = name = "Adamantine Longsword"
}}
name |
test |
Adamantine Longsword |
Test1.Test2.Test3. |
The space after the period also doesn't matter anymore if you use that work-around:
{{#cargo_query: tables = weapons
| fields = name, CONCAT("Test1. Test2. Test3.") = test
| where = name = "Adamantine Longsword"
}}
name |
test |
Adamantine Longsword |
Test1. Test2. Test3. |