Sounds like JavaScript is broken, which could be ANYTHING, so in Chrome, press F12, go to the 'Console' tab, refresh the page and print screen any errors and post here.
Hi Gareth,
Here are the screen shots of the JS errors.
Thanks for the help!
Hi Michael,
The screen shots show clearly a fault with the JavaScript of the theme, where at a guess the slider JavaScript has not been loaded by the theme's 'plugins.php' file. Have you (or others) made any changes to it recently? As you say its just stopped working. And the 'banner' and 'mediaplug' classes cannot be found.
Gareth
Hi Gareth,
The /moodle/theme/elegance/jquery/plugins.php hasn't been manually changed. The only changes made from the default theme settings have been html/css and replacing some moodle logos with our logo. I have looked at some of the php/js/jquery/less files in the theme for some (relatively simple) hacks, but didn't change anything. Otherwise I think I changed the ownership/permissions in the themes directory. I just gave the elegance theme directory full permissions (777), but there was no change.
-Michael
Hi Michael,
Odd. Is your site online?
File ownership should not affect it and could pose a security risk. I think the HTML is missing the CSS classes that the scripts reference.
Gareth
Does your installation have these files: https://github.com/moodleman/moodle-theme_elegance/tree/master/jquery ?
Are there any '404' errors on the 'Network' tab of the developer tools?
Have you changed anything in 'lib.php'? As remembered this: https://moodle.org/mod/forum/discuss.php?d=256875&parent=1113934.
Hi Gareth,
- The site is online.
- I changed the permissions back. I was just trying to eliminate the permissions and the culprit.
- There are all of the necessary jQuery files in the theme.
- I am getting a 404 with the request url: http://mymoodleipaddress/moodle/theme/jquery.php/core/jquery-1.10.2.min.map
- There is also a 304 response with the request url http://code.jquery.com/jquery-latest.min.map and remote address 108.161.188.209:80.
- I haven't changed anything in lib.php.
Hi Michael,
By 'is it online?' I meant 'Is it online so I can access via the URL and see if I can find the fault'. So, what is the URL please?
The jquery-latest.min.map will not be the culprit, but I would have thought that map file would be for the version of jQuery being used.
Gareth
Hi Gareth,
We don't have a domain linked to the site yet, but you can see the site at http://72.18.223.169/moodle.
-Michael
Thanks.
Do you know why jQuery is being loaded twice? I found the line:
script src="http://code.jquery.com/jquery-latest.min.js"></script
In the header.
And underneath that:
script type="text/javascript" src="/menu_source/menu_jquery.js"></script
Therefore have you added some custom jQuery to the theme without using the correct method for doing so? -> http://docs.moodle.org/dev/jQuery
I suspect that because its being loaded twice, the first instance which has the slider and media plugins is being overwritten by the second and hence the initialisation in the footer when the document is ready cannot find the functions.
I had a problem with the Elegance theme when I first tried it out. The slide show in particular and then dicovered quite by chance it was because Theme Designer Mode was ON switching it OFF made every thing work.
Hi Gareth,
Thanks for the help! I was loading jquery again from the site administration>appearance>additional html to enable a drop down menu. That was creating a conflict and messing with the slideshow. Thanks for all your help!
-Michael
Hello Gareth & Mary et al.
Here is my issue as posted before https://moodle.org/mod/forum/discuss.php?d=255432#p1107891
Persistent problem! No matter what I do my slideshow will not respond to the settings I select. Slideshow shows as in the screen shot on the forum reference. 4 Images seem stuck in the database no matter the number I choose in the setting.
Could you F12 this in Chrome and decipher it for me?
myesol.org/moodle
Mary has been diligently helping out with this but I can't seem to get it fixed.
I've updated the plugin.Purged caches...purged all caches Theme designer Mode off
Many thanks.
Peace on Easter
Image 5 & 6 are empty, i.e. url is - http://myesol.org/moodle/ which is probably throwing off the slider calculation for the overall width of the entire slider to make it slide.
Also getting:
Failed to load resource: the server responded with a status of 404 (not found) - http://myesol.org/moodle/theme/image.php/elegance/theme/1398025638/ - i.e. no actual image.
So disable slides 5 & 6 in the settings.
Also these width calculations look iffy after slide 4 - https://github.com/moodleman/moodle-theme_elegance/blob/ELEGANCE_26/layout/includes/slideshow.php#L145 given that they are not specified in the API of the slider: http://unslider.com/ but they are in the demo on the page. But there are only four slides, so given 25% of the 100% I suspect there is a coding fault in the theme where it needs to calculate the percentage based upon the number of slides that will be shown and output the correct HTML accordingly.
As the following percentages look wrong:
Or, given the code in https://github.com/moodleman/moodle-theme_elegance/blob/ELEGANCE_26/jquery/unslider_1.0.2.js, which appears to perform the calculations already, then Julian has a coding fault in the code of the layout by hard coding calculated values.
Need to test.
Wow that was fast Thanks a bunch!
Yep...I read that when I F12ed my site myself... oddly enough I only have 1 slide in the setting so just why it's looking for slide 4 and 5 lead me to conclude that there must be an issue with the database. Upon installing the first iteration of Elegance I experimented with 3 slides. When Julian addressed the bug I installed the next version but i could never get the original 3 images removed.
Peace
Ok, looks like the hard coded widths are wrong as they are calculated. But removing them shows that unslider is not responsive so the jQuery code needs improving. This will take time which I don't have.
Gareth,
Well you've done enough and it looks like you've helped solve another mystery. I'm only going to use 3 slides so I should be ok.
Perhaps this Easter egg hunt will help Julian as he continues to refine Elegance.
Many thanks again
peace
If I were you I would change theme to Clean theme and then uninstall the Elegance theme completely. This will remove all the settings from the Database.You will then be told to remove the elegance folder from the server.Once this is done, you can add the most up today's Elegance theme. If then you find that it is not working, then please report back.
thanks
Mary
Ahhhhh Yes! Girl,,, you put the E in Easter!
I attempted something like this earlier EXCEPTI didn't uninstall the Elegance theme completely, i just removed the folder thinking somehow the database settings would be magically wiped upon doing so.
So, as always, Many thanks to you and Gareth!
Peace
Hi Mary,
I've looked at Julian's code (latest master) on GitHub and the Unslider source too and they both will not work for variable responsive images.
Cheers,
Gareth
Well that can be remedied with CSS. From memory the Unslider works great on its own, so no reason whatsoever that it should stop working in Elegance, I think Julian made a few blunders trying to marry it up with Bootstrap 3.
Is anyone looking after Elegance theme? Is Julian still updating it?
Hi Mary,
The thing is, I've looked at the Unslider code and it does have a flaw with regards responsive webpage integration. It does have a fluid initialisation option but that is only for the container. The images within the slider are still specified a fixed width by the code in pixels based upon the window size at first render. If you resize the window then the images do not adjust. I suspect that Julian saw this and put in percentages instead in the included layout file for the slider. However they are fixed percentages based upon four slides. If you have less or more then you get the issues reported.
Therefore the solution is to remove the fixed inline CSS styles that are in the slider layout file and improve the Unslider jQuery code to work on percentages for the individual images based upon the number of images in the slider. The latter is not yet in Juilan's or indeed the main source of the Unslider itself.
Cheers,
Gareth
In that case people should switch to using http://bxslider.com/ instead...which is what I've used in the past.
And me in 'Mutant Banjo' thanks to you Mary
What's wrong with Bootstrap 3's carousel?
What's right with it?
It works for a start!
Hi Mary,
I'm just starting with the whole theme development/editing process, so my apologies in advance.
When you say people should switch to bxslider (which looks pretty cool and is really responsive in scaling images and text), how do I go about doing that in my Elegance theme? Which files do I need to look at for replacing these bits, but keeping the same administration (slider settings) page?
Thanks,
Richard Schwarz
Hi,
Looking back I made that comment when I was young and brash and wet behind the ears! Now I know better the easiest thing to do is use the 'Carousel' slider which is ALREADY coded in Bootstrap!!!
You can see the simple version of it HERE
It is easy enough to add as all you need to do is make sure your theme is a child of Bootstrapbase, or Bootstrap if you want to go down the Elegance path.
That said, Essential theme is having a makeover and the 'Carousel' slideshow is being added to it in the next version which is going to be released soon. Read more
Hope this helps?
Mary
Hi Gareth.
Can I ask for your professionalism and beg some help with this matter?
------>>> https://moodle.org/mod/forum/discuss.php?d=258748
Please. ^_^
Thanks. God Speed.