-
Notifications
You must be signed in to change notification settings - Fork 5
Statamic adding strange character entries like 0: and 2: to arrays #1594
Comments
Unfortunately I'm going to need to ask for more details. We'll need to know what caused it. No idea on the route screenshot either. That field is basically just manual entry, even from the CP. |
I know it is vague, but I have no idea how it happened or when or where or why. Sorry. I was just reporting that it happened and I wouldn't have even posted it if the same thing hadn't happened to Becky as well... maybe just leave/close it till someone else runs into the same thing or can actually recreate it. |
Looks like Becky's issue was that there was a I don't know if you are running into a similar problem, @anthubbard |
FWIW, that routes issue was way before the --- issue - for that, i entered the route correctly, saved it, went back later and that was there. Granted i could just think i typed it correctly, and mistyped something - but i'm 100% sure it looked right after i saved it, and didn't start with 0: until i went back in to look at it a few hours later to add another route. |
Alright! I managed to recreate my issue (won't help Becky though) :) I have a grid setup with another grid inside it:
If I had some rows to the outside grid and add content somewhere in the grid inside them then save the page all is well. If I then add an outside grid but don't put content inside it and save, all is still well. BUT then if I move that outside grid that has no content on the inside grid anywhere up the row list of the outside grids, it changes the - of the grid numbering to a number 0: etc So this:
Becomes:
Does that make sense? PS I'm glad I'm not going crazy... Ant |
Hi @jasonvarga this is happening a fair bit now - if I have a grid with a couple of rows and delete the content inside the inside grid it then stuffs all the other rows and they don't display. Any word on bugfix? Obviously there's a simple way around it - tell clients to ensure they have content in their inside grid fields and don't leave them empty (which makes sense anyway) - but that's not always easy in practice. This is not urgent but would be good if fixed at some point. I hate having to tell clients 'be careful not do X cause it breaks the CMS'. Cheers, Ant |
Change Let me know how that goes. |
With regards to @beckysoll 's issue: If you - for whatever reason - have this in your YAML:
It would get re-saved as what was posted in the screenshot. Maybe an accidental extra character got typed in somehow? Obviously there's no solution in this comment, but I'm just giving you some more info. Maybe it's helpful. ¯\_(ツ)_/¯ |
@jasonvarga Yeah that line 52 trick fixed it, thank you for looking into it 👍 |
Statamic is adding strange character entries in some really weird places in files. I have no idea how it is happening or at what point.
This happened to me - on an array on my index.md (homepage) this was added somehow by statamic (or at least I assume it was, I certainly didn't add it):
That array should be:
I figured it was some random issue, or possibly that I'd somehow done it - but the same thing happened to beckysoll and with possibly worse consequences in her routes.yaml file so it probably is a real issue:
V 2.6.6
The text was updated successfully, but these errors were encountered: