chasegiunta / craft-jason

A field type for displaying & editing JSON data.
Other
15 stars 11 forks source link

Unable to edit field #146

Open robin-gauthier opened 1 year ago

robin-gauthier commented 1 year ago

I have created a Jason field in my craft 4.0 website without issue. As I went back to edit my field, this error is displayed.

`Invalid Configuration – yii\base\InvalidConfigException

An asset bundle that depends on 'craft\web\assets\cp\CpAsset' has a higher javascript file position configured than 'craft\web\assets\cp\CpAsset'.`

I found in this file: production/htdocs/vendor/chasegiunta/craft-jason/src/fields/JasonField.php that if I change the view position at this line, the page will be correctly display.

Craft::$app->getView()->registerAssetBundle(JasonFieldAsset::class, View::POS_BEGIN );

to

Craft::$app->getView()->registerAssetBundle(JasonFieldAsset::class, View::POS_END );

I'm not sure how this could affect the others functionalities of the plugin, but so far I don't see anything weird.

frederikvdbe commented 11 months ago

I'm getting the same error.