View more context

 

unclecheese

cause it works in asset admin, which is also react, so.

null

no idea, my react skills are crap. Editing the original was good enough for me, but it will definitely be a problem if I need to re-use one

null

so, userforms element... seems I'm getting some errors. userforms-cms.js?m=1557373498:1: Uncaught ReferenceError: jQuery is not defined at Object.0 (userforms-cms.js?m=1557373498:1)

unclecheese

I had userforms elemental installed and working fine and now it's shitting itself.

unclecheese

hang on.. i have to switch back to that branch and recomposer everything

unclecheese

and redatabase everything because obsolete classes and denormalised polymorphic has_ones.. yay!

null

Don't suppose you had better luck than me? 😛

null

apparently it always works for me, even when I didn't know about it

null

For what it's worth, my original error went away after I checked out a stable tag. ^4 instead of 4.x-dev

Scopey

Ok interesting - there's an unreleased commit on the dev branch that is just bumping npm dependencies

unclecheese

Yeah, mine blew up when I ran composer update

unclecheese

but... one of its dependencies, fileblock, requires elemental 4.x-dev

Scopey

Yeah I think 2.3.0 or whatever would give you a stable version

Scopey

cd vendor/dnadesign/silverstripe-elemental; git checkout HEAD~1; git checkout -- .

Scopey

Does that work given you're on the 4.1 dev branch?

Scopey

Do you want to raise an issue for us with the message you're getting?

null

So I went to sleep, then came back to find this error again. Any ideas what's triggering it?

Scopey

I thought it was just the latest commit on the dev branch

null

weird, I've got a stable version 3.0.0 checked out

Scopey

Yeah sorry, that's the latest commit on the dev branch of elemental

null

hoping to stick with stable-ish versions, so I used composer require dnadesign/silverstripe-elemental "4.0.5 as 4.1.0". In case anyone else comes across it 😄

null

it seems so, yeah. Can anyone else confirm?

null

it's a really tricky one to pin down

Scopey

The head commit on the dev branch is a npm dependency update - so it sort of explains the problem. Wouldn't surprise me if it's that


Show less replies
theruss

Has anyone managed to integrate SVG uploads into the CMS, like "properly"? And I define "properly" as, I can upload an SVG and see a thumbnail in the UploadField and in the AssetAdmin?

Nick

Hi @theruss I've just joined this SS slack channel searching for the issue mentioned above

Nick

I belive this is also your situation?

theruss

What I can do:

• Upload .svg via assets admin • Upload .svg via UploadField • See a peview of the SVG within the SVG field

These were my only requirements.

What I can't do - because SVGs are vector graphics (XML files really) and not raster graphics:

• Resize • Scale • Generate custom thumbnails

theruss

For the latter points, you'd need to implement a separate Image class with alternatives for all the image-manipulation features you'd like to see.

theruss

FYI this package (https://github.com/restruct/silverstripe-svg-images) Allows limited SVG manipulation

Show 1 attachment(s)
GitHub  
restruct/silverstripe-svg-images

Basic SVG Image support for Silverstripe (Uploads/Assets) - restruct/silverstripe-svg-images

Hide attachment content
Nick

Hi! and thank you for reply. My problem is that since upgrading to SS 4.4 that thumbnail doesn't show up on first load of page. And my guess is that route is not found as it was in earlier version I had before (SS4.2.1) and I think is related to entwine library. I thought you have the same problem. Am I wrong?

theruss

No I don't have this problem. Mine was only ever a CMS thumbnail problem

Nick

thanx! I think it's from SS crazy assets!!! 🤦‍♂️ (folder rights)


Show less replies
theruss

Forgive me, I may have asked this before. Just coming back to it now.

muskie9

I've gotten the upload, but don't think I ever got a preview though...

Rathai

Hi. Does anyone have solution for adding multiple file upload field in custom form.

muskie9

may be based on how SS views it as a "File" vs "Image"