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

The file key of a FileBone relation is being sent to the viur-core under a wrong form-key #27

Open
sveneberth opened this issue Feb 20, 2024 · 0 comments · Fixed by viur-framework/vi-vue-components#11
Assignees
Labels
bug Something isn't working Priority: High After critical issues are fixed, these should be dealt with before any further issues.

Comments

@sveneberth
Copy link
Member

sveneberth commented Feb 20, 2024

I have a file relation like:

    image = FileBone(
        descr="Image",
        derive={
            "thumbnail": [
                {"width": 200, "height": 200},
                {"width": 400, "height": 400},
            ],
        },
    )

The file relation (the file key) is not sent correctly to the viur-core in an skeleton edit.

It sends my_image_bone.key, but not my_image_bone -- but this is what the core currently expects (without an using skel). Therefore, the value is not practically submitted and not written in the Skeleton. Even if the preview is kept after saving, the supposedly set image is gone again after a reload.

This bug is related to viur-framework/viur-core#1045


Payload of an existing file entry (invalid; without image):

image.key: ag12aXVyMy1*************gRmaWxlGICAgNj1mIUKDA
image.creationdate: 2023-05-12T18:30:11+02:00
image.changedate: 2023-05-12T18:30:11+02:00
image.viurCurrentSeoKeys.en: 565***1987200
image.parententry: ag12aXVyMy1************ROb2RlIg9yZXBfbW9kdWxlX3JlcG8M
image.parentrepo: ag12aXVyMy10*************b3ROb2RlIg9yZXBfbW9kdWxlX3JlcG8M
image.sortindex: 1683909011.347819
image.size: 4166
image.dlkey: 01***iCFI
image.name: super_cloud.png
image.mimetype: image/png
image.weak: false
image.pending: false
image.width: 0
image.height: 0
image.downloadUrl: /file/download/MDF**FpOd****Y2Uvc3VwZXJfY2xvdWQ*ADAA?sig=a437f14e8fe61e9874c03ded******d59cca764d15813c24f1a247**ba939bb2f7c2757ac07
image.derived: 
image.pendingparententry: ag12aXVy**************XBfbW9kdWxlX3JlcG8

Payload of an directly uploaded file (correctly; with image):

image: ag12aXVy**********ICAgLjgmo0JDA
image.key: ag12aX*********ELEgRmaWxlGICAgLjgmo0JDA
image.rel: 

Using:

vi-admin: v4.1.3
viur-core: v3.5.14

@sveneberth sveneberth added Priority: High After critical issues are fixed, these should be dealt with before any further issues. bug Something isn't working labels Feb 20, 2024
@sveneberth sveneberth changed the title The file key of a FileBone relation is being sent to the viur core under a wrong key. The file key of a FileBone relation is being sent to the viur-core under a wrong form-key Feb 20, 2024
@sveneberth sveneberth linked a pull request Feb 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority: High After critical issues are fixed, these should be dealt with before any further issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants