Image Slider failing in Composer
Permalink
Hi all!
I have tried to add an Image Slider block into the composer to enable an easier UI for a customers website.
When you open the composer, your get the spinning wheel permanently and the Save/Publish buttons do not appear. I have narrowed this down to the following section of code in the block, but even when removing this the Image Slider block doesnt work properly in the Composer.
The code starts at line 141 in the form_setup_html.php file.
Can anyone advise or help?
thanks
Simon.
I have tried to add an Image Slider block into the composer to enable an easier UI for a customers website.
When you open the composer, your get the spinning wheel permanently and the Save/Publish buttons do not appear. I have narrowed this down to the following section of code in the block, but even when removing this the Image Slider block doesnt work properly in the Composer.
The code starts at line 141 in the form_setup_html.php file.
Can anyone advise or help?
thanks
Simon.
Hi!
I have managed to solve this problem as well as customising Image Slider to store a unique ID to refer to the page as everytime you update in composer it updates the block number which in turn then kills the reference to the images stored. Basically I have got it working, to a fashion!
The problem I now have is when I return to composer to update the page details as I would prefer to use for my clients (tell them one place to go for adding and editing and they are less likely to mess it up!) but the images that I have added do not show in the composer window. It would appear that when you go enter composer, the following function in the controller.php file doesn't get called
as such it doesnt then populate the Array 'rows' which is required to render the images in the editor (see attachment).
If I could figure out how to at least run this it would all work beautifully!
I have managed to solve this problem as well as customising Image Slider to store a unique ID to refer to the page as everytime you update in composer it updates the block number which in turn then kills the reference to the images stored. Basically I have got it working, to a fashion!
The problem I now have is when I return to composer to update the page details as I would prefer to use for my clients (tell them one place to go for adding and editing and they are less likely to mess it up!) but the images that I have added do not show in the composer window. It would appear that when you go enter composer, the following function in the controller.php file doesn't get called
public function edit() { $this->requireAsset('core/file-manager'); $this->requireAsset('core/sitemap'); $this->requireAsset('redactor'); $db = Loader::db(); $query = $db->GetAll('SELECT * from btPropertyDetailsImages WHERE pdtID = ? ORDER BY sortOrder', $this->pdID); $this->set('rows', $query); }
as such it doesnt then populate the Array 'rows' which is required to render the images in the editor (see attachment).
If I could figure out how to at least run this
$db = Loader::db(); $query = $db->GetAll('SELECT * from btPropertyDetailsImages WHERE pdtID = ? ORDER BY sortOrder', $this->pdID); $this->set('rows', $query);
I believe this is a bug. I have committed what I believe will fix this issue. Check out this commit:
https://github.com/concrete5/concrete5-5.7.0/commit/0a6c2cc9c8e76040...
https://github.com/concrete5/concrete5-5.7.0/commit/0a6c2cc9c8e76040...
Are you using a custom theme?