GithubHelp home page GithubHelp logo

Comments (13)

aheinze avatar aheinze commented on June 6, 2024 1

@pozylon Thanks, unfortunately I still can't reproduce it. Do you have any custom code that hooks into the content model save event maybe?

from cockpit.

Mikearaya avatar Mikearaya commented on June 6, 2024

additional info: this happens when setting a preview page URL for more than one collection/content

from cockpit.

aheinze avatar aheinze commented on June 6, 2024

when does the error occur?

from cockpit.

Mikearaya avatar Mikearaya commented on June 6, 2024

@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

from cockpit.

aheinze avatar aheinze commented on June 6, 2024

when you create a new collection or update an existing one?

from cockpit.

aheinze avatar aheinze commented on June 6, 2024

Is it possible to create a video, so I can understand when and where the error happens?

from cockpit.

Mikearaya avatar Mikearaya commented on June 6, 2024

update existing one, with a preview url

from cockpit.

aheinze avatar aheinze commented on June 6, 2024

nope, can't reproduce

from cockpit.

Mikearaya avatar Mikearaya commented on June 6, 2024

@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

from cockpit.

aheinze avatar aheinze commented on June 6, 2024

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?

from cockpit.

pozylon avatar pozylon commented on June 6, 2024

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?

  • I set the preview endpoint for collection a and name it "test" with some url
  • I set the preview endpoint for collection b and name it "test" with same url as above
  • I go to content overview page, hard refresh -> collections don't show up anymore (only way to fix is manually editing the collection content php files)

If i use test-a and test-b as keys it works

from cockpit.

aheinze avatar aheinze commented on June 6, 2024

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

from cockpit.

pozylon avatar pozylon commented on June 6, 2024

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...

from cockpit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.