wintercms / winter

Free, open-source, self-hosted CMS platform based on the Laravel PHP Framework.
https://wintercms.com
MIT License
1.31k stars 188 forks source link

Failed to configure list setup in preview page #1145

Open cheuklam opened 1 month ago

cheuklam commented 1 month ago

Winter CMS Build

dev-develop

PHP Version

8.1

Database engine

MySQL/MariaDB

Plugins installed

No response

Issue description

image

relation widget cannot change setup in preview mode.

Steps to replicate

1) preview any manage view 2) click on the list setup button on any relation controller widget 3) change order / check / uncheck items 4) Apply

Workaround

Dont use preview mode, use edit mode

LukeTowers commented 2 weeks ago

This is probably caused because the relationcontroller would be in readOnly mode in the preview context, which might be causing the widget to not be bound correctly. @mjauvin is this something you can take a look at?

mjauvin commented 2 weeks ago

should we hide the list setup button in preview mode?

LukeTowers commented 2 weeks ago

@mjauvin ideally we fix it so that it works correctly, you would still want to use it in preview mode.

mjauvin commented 2 weeks ago

@cheuklam I tried to reproduce on a model preview with a relation controller and it's working fine for me. Can you explain how you render the relation controller ?