File Selector in Dashboard not working
Permalink
I've got a package which doesn't work on the latest released version 5.3.3.1 but it does on svn and I just wonder whether this is a bug or not..
I'm using this code in a dashboard extension:
On the svn site I get this code:
but on 5.3.3.1 I get this:
any hints?
I'm using this code in a dashboard extension:
$al = Loader::helper('concrete/asset_library'); echo $al->image('ccm-b-image', 'fID', t('Choose Image'), $bf);
On the svn site I get this code:
<a onclick="ccm_chooseAsset=false; ccm_alLaunchSelectorFileManager('ccm-b-image')" href="javascript:void(0)">Choose Image</a>
but on 5.3.3.1 I get this:
<a class="ccm-file-manager-launch" onclick="ccm_chooseAsset=false" href="javascript:void(0)">Bild auswählen</a>
any hints?
Good find. Definately needs fixing for the next release. i tried to override the helper by creating concrete/asset_library in my helpers directory and that resulted in white screening.
Not enough time to follow up - So keep in mind.
Not enough time to follow up - So keep in mind.
Is this issue resolved?
it was already fixed in svn when I posted the first message.
I'm unable to make the User file attribute work. I see the select file link in the edit user profile but it doesn't do anything when clicked. When I view the public profile it says:
Fatal error: Call to a member function getDownloadURL() on a non-object in /home/outaouai/public_html/concrete/models/attribute/types/image_file/controller.php on line 19
Do you have any ideas of why it does that?
Fatal error: Call to a member function getDownloadURL() on a non-object in /home/outaouai/public_html/concrete/models/attribute/types/image_file/controller.php on line 19
Do you have any ideas of why it does that?
See video attached
What is the code behind the "Choose File" link?
<script type="text/javascript"> var ccmAttributeTypeSelectHelper={ add:function(akID, field){ var newRow=document.createElement('div'); newRow.className='newAttrValueRow'; newRow.innerHTML=' <input name="' + field + '" type="text" value="" /> '; newRow.innerHTML+='<a onclick="ccmAttributeTypeSelectHelper.remove(this)" href="javascript:void(0)">[X]</a>'; $('#newAttrValueRows'+akID).append(newRow); }, remove:function(a){ $(a.parentNode).remove(); } }
Viewing 15 lines of 27 lines. View entire code block.
not that it really matters at this point, but when this was put into a singlepage you needed to manually call ccm_activateFileSelectors(camelcase might be wrong there);
so ccm_activateFileSelectors(); in a jquery document ready function.
Thanks to mirv for that one.
so ccm_activateFileSelectors(); in a jquery document ready function.
Thanks to mirv for that one.
ScottC: I'm using the default single_page/profile/edit.php of conrete5. Is it supposed to work by default ?
I added ccm_activateFileSelectors(); in a document ready but it doesn't make any difference.
Thanks for help.
I added ccm_activateFileSelectors(); in a document ready but it doesn't make any difference.
Thanks for help.
to be totally honest, i am not sure. My only interactions with this situation are through the blog app(under dashboard so everything under the "concrete5 sun" is loaded there, or through a block add/edit, where again everything is loaded.
I haven't actually loaded these in a standard non-dashboard or block add/edit form so I can't speak from personal experience as to why this wouldn't work aside from making sure the controller that is associated with this single page is loading via its on start method whatever ccm or otherwise js is associated and thus makes available this function.
I haven't actually loaded these in a standard non-dashboard or block add/edit form so I can't speak from personal experience as to why this wouldn't work aside from making sure the controller that is associated with this single page is loading via its on start method whatever ccm or otherwise js is associated and thus makes available this function.
I did a test and included everything js and css. And it worked, with some little bugs but in general.
So nothing load for REGISTRATED group users ?
I tought that everything is always loaded properly when <?php Loader::element('header_required'); ?> is added.
So nothing load for REGISTRATED group users ?
I tought that everything is always loaded properly when <?php Loader::element('header_required'); ?> is added.
not necessarily, it depends on if it is under /dashboard/ and this it has an entirely independent header and theme and all of that. That is the scope of my experience with this, haven't dealt outside of this, honestly i haven't looked at profiles..ever :(
Has there been a solution to this bug yet?
EDIT: apparently it works in the .4 version
EDIT: apparently it works in the .4 version
Yes, this is fixed in 5.4.
in helpers/concrete/asset_library.php
line 49 should be: