madeyourday / contao-rocksolid-custom-elements

RockSolid Custom Elements Contao Extension
http://rocksolidthemes.com/de/contao/plugins/custom-content-elements
MIT License
48 stars 12 forks source link

Support other picker widgets #34

Closed dmolineus closed 9 years ago

dmolineus commented 9 years ago

If I use a 3rd party widget (f.e. https://github.com/netzmacht/contao-icon-wizard) within the custom elements extension which has a popup picker like the file or page tree widget, it's not working because the virtual field does not exists.

Affected conditions:

ausi commented 9 years ago

CustomElements.php:76-93 gets never called from your extension because it doesn't execute onload_callbacks.

Maybe your extension has to do something like system/modules/core/controllers/BackendFile.php:70-72?

ausi commented 9 years ago

Next problem is that your extension tries to load the virtual field from the database IconWizardController.php:59 which fails Unknown column 'rsce_field_icon' in 'field list'

ausi commented 9 years ago

Another issue is that CustomElements.php:49-51 will not pass. This check is necessary to check for requests like contao/main.php?do=article&table=tl_content&id=1.

dmolineus commented 9 years ago

Thanks for the hints. Had tried it some times ago and noticed that even if I create the DC_Table and trigger the callbacks it would fail because of the mentioned conditions. I'll prepare my extension to support this requirements.

dmolineus commented 9 years ago

I prepared the widget to support the onload_callback and load_callback. Still the above mentioned limitations in contao-rocksolid-custom-elements prevents them to work.

If you want to test it, it's currently only part of the develop branch. https://github.com/netzmacht/contao-icon-wizard/tree/develop

ausi commented 9 years ago

It seems like your extension still tries to load the virtual field from the database. Please try the draft/improve-compatibility branch and tell me if it works for your extension.

dmolineus commented 9 years ago

It works fine now with the changes in the branch. Thanks for the great and fast support.

ausi commented 9 years ago

It’s in the master branch now.