Orchardcore: Content Picker field in Widget

Created on 9 Sep 2019  ·  10Comments  ·  Source: OrchardCMS/OrchardCore

Hi guys,

I have created a lot of Widget with a content picker field.

For all this items, when I try to add a widget in a page, the content picker field is not shown until I save the page.

I think the problem come out from the fact that the field load items by javascript code...I don't know if there is some "right fix" for that but a workaround can be a first loading of Content Types in the Edit function of ContentPickerFieldDisplayDriver class.

bug

Most helpful comment

Problem is that I only initialize them on load.
I broke this by removing the init function from the html and putting it all in the script. I forgot that widgets added dynamically needed to trigger the picker init script again.

All 10 comments

/cc @jptissot

hmmm strange one. But yes @jptissot changed the js scripts recently but maybe not related at all.

I will try to repro.

Problem is that I only initialize them on load.
I broke this by removing the init function from the html and putting it all in the script. I forgot that widgets added dynamically needed to trigger the picker init script again.

Sorry guys,

this issue persist on dev branch.

I tested it and it worked for me. Do you have repro steps?

@jptissot you work on windows 10?

4222.zip

Hope it can be more clear than me but I try to explain it by words.

I have created a Widget with a content picker field and, when I add it to a Page, the widget doesn't load the content picker field (doesn't load the content item list). If I save the page, the widget load the content item list correctly.

Yes, I tested this using window 10.
Hmm I just tried again with a fresh version of latest dev and it works fine in a widget.

If you are targeting the right version ? If you want the latest dev version that has DotnetCore 2.2 support, please use the version 1.0.0-beta3-72452 that is available on myget.

You might also need to force refresh your js (ctrl+f5)

@jptissot I'm sorry (my written english lack a lot), the question about windows 10 is for the content of the zip package that I think it's work only under windows OS.

When I solve a strange issue with the recipe of my theme I try to test it another time. I'm on dev branch. Thanks

🤦‍♂️🤦‍♂️🤦‍♂️

damn cache! Sorry @jptissot my fault

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cbadger360 picture cbadger360  ·  4Comments

jardg picture jardg  ·  3Comments

ns8482e picture ns8482e  ·  4Comments

kevinchalet picture kevinchalet  ·  4Comments

deanmarcussen picture deanmarcussen  ·  3Comments