Sadly, I haven't got Tidypics fully working on Elgg 4 yet. I thought it wouldn't be time-consuming as only minor updates seemed necessary in the latest Elgg 3.3 version to get it working on Elgg 3. Well, I was a bit wrong...
One thing I got stuck with is the JS stuff used for HTML5 uploader, slideshow etc.. Part of the problem seems to be that jquery-ui libs are no longer fully loaded by default as it had been the case on Elgg 3 but you now have to require every module you need separately. The problem I have is that I don't exactly know which modules are even needed AND if I even load them correctly. Next issue could be incompatibilites of the uploader and slideshow libs used with the jQuery version used in Elgg 4. But how to know this with no good error messages provided in the browser console beside ""blabla function not found" that could also be just due to a missing dependency.
So, any help?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Jerome Bakker@jeabakker
Jerome Bakker - 0 likes
- iionly@iionly
iionly - 0 likes
- Jerome Bakker@jeabakker
Jerome Bakker - 0 likes
- iionly@iionly
iionly - 0 likes
You must log in to post replies.Doesn't the HTML5 uploader have documented which jquery-ui libs it needs?
Or is there a newer version of the uploader with AMD support. that way the uploaded will handle all the requirements?
There is currently no way in Core to load the full jquery-ui lib. As there is probably never a need to have the full ui loaded. Only parts. This will save on user load times.
New version of plupload have a different license I don't want to switch to. And the documentation doesn't mention any dependencies at all.
By using elgg_define_js in bootstrap init and then require in the AMD module I got it working. But then I have again the problem with the user-specific language not being used (you might remember that problem I also had on Elgg 3 already). I "solved" the language issue by using elgg_register_external_file / elgg_load_external_file back then but I haven't got it working on Elgg 4 in the same way so far (probably a race-condition with loading of dependecies).
The slideshow seems also available at https://github.com/GalleriaJS/galleria. Though if I remember correctly it hasn't worked using it as AMD module out-of-the-box this way and I had rewritten it to work. But I don't see which jquery-ui modules might be required (if any).
You could always include the complete jQuery-UI as a dependency in your plugin and only load the full jQuery-UI on your pages.
Elgg uses https://asset-packagist.org/package/npm-asset/components-jqueryui v1.12.1, so for example you could use https://asset-packagist.org/package/npm-asset/jquery-ui with the same version requirements as Elgg https://github.com/Elgg/Elgg/blob/6c4f01852ee0a8eb5f1caf108fda455726a0d3ce/composer.json#L35
Edit:
The link i provided apparently is also the split jQuery-UI, so you might have to look around
I've got the uploader working now. The jquery-ui modules needed was a bit of trial and error still after I had found a docs fragment listing some requirements. Still, I had to rewrite parts of the Tidypics code to get it working on Elgg 4 because the former approach of loading the libs and translations didn't work anymore at all. Well, finally got this part working.
Now I'm stuck with the JS slideshow seemingly not compatible with jquery3 - took me a whole week to figure this out as the way of requiring the modules had to be rewritten, too. Now I'm not sure how to proceed as it might be that a total rewrite of the slideshow code might be necessary to replace all the methods no longer available - not knowing which due to lack of any error messages... I can just say it's absolutely frustrating right now.