Closed pozylon closed 7 months ago
additional info: this happens when setting a preview page URL for more than one collection/content
when does the error occur?
@aheinze when setting a preview URL for a collection. when it's set for only one collection it is fine but if you set the preview endpoint for more than two collections there is a problem
when you create a new collection or update an existing one?
Is it possible to create a video, so I can understand when and where the error happens?
update existing one, with a preview url
nope, can't reproduce
@pozylon and I were able to identify the root cause. it is related to the behavior of array_merge
If the input arrays have the same string keys, then the later value for that key will overwrite the previous one. If, however, the arrays contain numeric keys, the later value will not overwrite the original value but will be appended.
basically, if you have multiple preview endpoints for different collections with the same key it will break the code
so while we can work around this issue for now I think it should not be implemented like that. it is not like this on older versions
basically, if you have multiple preview endpoints for different collections with the same key it will break the code
I still don't get it. Can you provide more details or context?
basically, if you have multiple preview endpoints for different collections with the same key it will break the code
I still don't get it. Can you provide more details or context?
If i use test-a and test-b as keys it works
@pozylon Thanks, unfortunately I still can't reproduce it. Do you have any custom code that hooks into the content model save event maybe?
Let me know if I can support you to investigate the issue, as I want to release a new version soon and want to make sure that this issue won't get shipped with the next version
Let me know if I can support you to investigate the issue, as I want to release a new version soon and want to make sure that this issue won't get shipped with the next version
We are trying to reproduce the issue locally but without success yet. It's weird because we use the cockpit pro docker image. Trying to spot the difference...
Seems to be another regression with the newer versions @aheinze but this time I don't know how to fix