Skip to content
This repository has been archived by the owner on Aug 10, 2018. It is now read-only.

Image Gallery Page in CMS won't load. #7

Open
MattyBalaam opened this issue Nov 20, 2012 · 6 comments
Open

Image Gallery Page in CMS won't load. #7

MattyBalaam opened this issue Nov 20, 2012 · 6 comments

Comments

@MattyBalaam
Copy link
Contributor

With a fresh install of Silvestripe 3.0.3, and the zip of display_anything installed, with the example ImageGalleryPage in mysite/code after creating the page, I just get the loading animation. It's been running for 10 minutes.

This is in Chrome 23, the site is running on MAMP 2.1.1, php5.4.4

@MattyBalaam
Copy link
Contributor Author

VideoGalleryPage example also shows same behaviour.

@zoao
Copy link

zoao commented Nov 25, 2012

You obtain a javascript error?
I also installed in version 3.0.3 on windows and not had this problem

@MattyBalaam
Copy link
Contributor Author

Hi, the console tells me: [23:00:29.285] Error: cannot call methods on button prior to initialization; attempted to call method 'destroy' @ http://localhost:8888/composer-test/framework/thirdparty/jquery/jquery.js?m=1352401611:551

@MrJamesEllis
Copy link
Member

There were a bunch of commits on Nov 18 that may help here:
https://github.com/codem/DisplayAnything3/commits/master

There were some issues with the uploader backend not kicking off post submit. The commits on Nov18 bind to the aftersubmit event.

If the the field has the text "Loading uploader..." then the uploader hasn't been able to attach itself to the file upload dropzone. The text showing is the default text that is replaced by JS.

Not sure about the destroy error, seems unrelated. I haven't been able to duplicate it.

Thanks
James

@MattyBalaam
Copy link
Contributor Author

If I comment out the requirements code on line 346 in DisplayAnythingGalleryField.php for jquery-ui the page loads and works.

I also notice there are a number of lines such as 349, 350, 359 and 360 which specifically state for the module directory to be called "display_anything". Perhaps you can detect the modules folder name, an implementation exists here: https://github.com/arambalakjian/DataObjects-as-Pages/blob/master/_config.php

@MrJamesEllis
Copy link
Member

I see, we're loading the minified jquery JS but SS loads the non minified version, so it's possibly doubling up.

This was fixed internally but it looks like it hasn't made it up to Github. For now, this should work:

    Requirements::javascript(THIRDPARTY_DIR."/jquery/jquery.js");
    Requirements::javascript(THIRDPARTY_DIR."/jquery-ui/jquery-ui.js");

I'll leave the module directory as-is, it's mentioned in the readme and defining it at runtime seems to be the exception rather than the rule.
https://github.com/codem/DisplayAnything3/#installing

I'll leave this open until the jquery change has gone up.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants