Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nothing shows up... #3

Closed
ACPK opened this issue Dec 26, 2016 · 13 comments
Closed

Nothing shows up... #3

ACPK opened this issue Dec 26, 2016 · 13 comments

Comments

@ACPK
Copy link

ACPK commented Dec 26, 2016

No description provided.

@rikkipitt
Copy link
Member

@ACPK looks like this is to do with javascript inclusion ordering in the new Administrate.

The compiled JS is appended to the end of the HTML document, while the CKEditor gem adds inline JS which loads before the main files are. Looks like everything is okay apart from this... I'll look into it over the next few days.

@adrianvalenz
Copy link

Sweet. Looking forward to it.

@ACPK
Copy link
Author

ACPK commented Jan 3, 2017

@rikkipitt - Thanks! Can't wait!

@rikkipitt
Copy link
Member

@ACPK @adrianvalenz I had a brief look at the issue, and I'm not sure what to do really. Essentially, Administrate loads their JS in the footer before the closing </html> tag. The ckeditor gem inlines some JS which picks up on config parameters that @pedantic-git kindly incorporated.

https://github.com/thoughtbot/administrate/blob/780aa1ea7f8093ba3a99314f16a4db77689107f6/app/views/layouts/administrate/application.html.erb#L42

The field JS is loaded before the ckeditor plugin inclusion and so doesn't show up. Perhaps we ask Administrate to accept a pull request to load JS in the head? Not sure if they'll do that though...

@pedantic-git
Copy link
Contributor

Now it's back in active maintenance I think they're pretty receptive to PRs like that which have an obvious use case.

@adrianvalenz
Copy link

Can we fork our own version of their Administrate, change the code to load JavaScript in the head, and install the gem with a github ref to ours? At least until they make the change?

@rikkipitt
Copy link
Member

Of course, who wants to submit the pull request? I can if you'd like me to?

@rikkipitt
Copy link
Member

Not a great start! I forked their master repo, ran ./bin/setup and then rake to start the test suite. 50+ tests are failing... anyone else getting the same?

@adrianvalenz
Copy link

Maybe git clone the tag version 3.0.0?

@rikkipitt
Copy link
Member

rikkipitt commented Jan 6, 2017

@adrianvalenz tried that, it's actually related to this - thoughtbot/administrate#726

That was added 1 hour ago... what are the chances?! I was running an old version of PhantomJs.

@adrianvalenz
Copy link

Oh dang. :/

Sorry I fell asleep...it's 11am right now pacific time. Where are you guys at?

@rikkipitt
Copy link
Member

Morning @adrianvalenz, I'll submit a pull request this evening and let you guys know when it's ready. It'll be on my fork of Administrate found here - https://github.com/jemcode/administrate

I'll let you know when you can use my git ref and get things working.

Rikki

@rikkipitt
Copy link
Member

@ACPK @adrianvalenz @pedantic-git This is all fixed now in release v0.0.4.

https://github.com/jemcode/administrate-field-ckeditor/releases/tag/v0.0.4

Hope this helps!

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

No branches or pull requests

4 participants