Jump to:

5539 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » uploadfield modfications CMS 3.1.1

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 366 Views
  • badjedi
    Community Member
    25 Posts

    uploadfield modfications CMS 3.1.1 Link to this post

    I have tried using yaml or jus the config examples in http://doc.silverstripe.org/framework/en/reference/uploadfield.

    But none seem to work properly as in setting custom folder or canUpload. They appear to have some effect, but don;t work.

    canUpload false will remove the "from computer" option, but then when you click "from files" to pick a image form files, I get his following error in the 8javascript inspector:

    Uncaught exception TypeError {} in onmatch on
    <div id=​"Photo" class=​"field upload ss-upload ss-uploadfield">​…​</div>​
    Stack Trace:
    TypeError: Cannot call method 'replace' of undefined
    at jQuerySub.$.entwine.onmatch (http://localhost:8888/lapisaronda/assets/_combinedfiles/uploadfield.js?m=1382296278:113:393)
    at Array.proxy [as onmatchproxy] (http://localhost:8888/lapisaronda/assets/_combinedfiles/lib.js?m=1382296084:1676:216)
    at HTMLDocument.<anonymous> (http://localhost:8888/lapisaronda/assets/_combinedfiles/lib.js?m=1382296084:1691:131)
    at HTMLDocument.jQuery.event.dispatch (http://localhost:8888/lapisaronda/assets/_combinedfiles/lib.js?m=1382296084:207:482)
    at HTMLDocument.elemData.handle.eventHandle (http://localhost:8888/lapisaronda/assets/_combinedfiles/lib.js?m=1382296084:174:182)
    at Object.jQuery.event.trigger (http://localhost:8888/lapisaronda/assets/_combinedfiles/lib.js?m=1382296084:198:209)
    at jQuery.fn.extend.triggerHandler (http://localhost:8888/lapisaronda/assets/_combinedfiles/lib.js?m=1382296084:246:759)
    at Base.extend.triggerEvent (http://localhost:8888/lapisaronda/assets/_combinedfiles/lib.js?m=1382296084:1656:261)
    at http://localhost:8888/lapisaronda/assets/_combinedfiles/lib.js?m=1382296084:1656:424 lib.js?m=1382296084:1629
    XHR finished loading: "http://localhost:8888/lapisaronda/admin/pages/treeview". lib.js?m=1382296084:531
    Uncaught TypeError: Cannot read property 'urlSelectDialog' of null

    and no php errors..

    I tried several other uploadfield form modifications, but the only one that could work is setAutoUpload.

    Does any one have any ideas?

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.