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

Can't edit rich text tile, problem in plone.app.widgets #418

Closed
fulv opened this issue May 15, 2014 · 7 comments
Closed

Can't edit rich text tile, problem in plone.app.widgets #418

fulv opened this issue May 15, 2014 · 7 comments
Labels

Comments

@fulv
Copy link
Member

fulv commented May 15, 2014

Hi guys, @garbas,

I'm guessing this is an issue in plone.app.widgets, but I have no idea even how to debug it, so I'm wondering if anyone else has seen this.
I create a cover, add a rich text tile to it, go to Compose, and click Edit.
The result is the usual overlay, but the place where the TinyMCE editor should be is empty. Also, the "X" (close) and cancel buttons don't make it go away.
In the firebug console I get this error:

TypeError: r is undefined   

...ecode:o.decode,encode:o.encodeAllRaw,insertAfter:function(e,t){return t=this.get...

++resource++plone.app.widgets.js (line 994)

Obviously, that plone.app.widgets.js file is minified, so it's impossible to figure out where the error actually is, or why it's happening.
I'm despairing of ever being able to find a KGS for all the packages I need, and I need to launch this client project, but every time I try to fix one problem by changing one version, something else breaks. I'm getting really frustrated.

Here are the versions I have:
Plone 4.3.3
collective.cover 1.0a8.post1
plone.app.contenttypes 1.2a1
plone.app.event 1.2.4
plone.app.widgets 1.5.0
plone.app.jquery 1.8.3

I would be super grateful for any help!
Thanks!

@fulv fulv added the question label May 15, 2014
@hvelarde
Copy link
Member

@hvelarde
Copy link
Member

BTW, these are the versions you need: https://github.com/plone/plone.app.event/blob/1.2.x/versions.cfg

@hvelarde
Copy link
Member

you should have asked before using collective.cover and plone.app.widgets together; AFAIK you are the first one doing this... good luck!

@fulv
Copy link
Member Author

fulv commented May 19, 2014

I've pinned the versions so I have the same ones as in https://github.com/plone/plone.app.event/blob/1.2.x/versions.cfg

This is as far as I got debugging it: until I hit this line, the overlay comes up, and there is raw HTML in the <textarea id="collective.cover.richtext.text" class="mce_editable pat-tinymce">.

Then, stepping into tiny_mce_gzip.js, all is well until https://github.com/plone/Products.TinyMCE/blob/1.3.6/Products/TinyMCE/browser/tiny_mce_gzip.js#L43

which jumps to another minified and undebuggable script: https://github.com/plone/Products.TinyMCE/blob/1.3.6/Products/TinyMCE/skins/tinymce/jquery.tinymce.js#L1

That's when the error is thrown, and the textarea above disappears.

Products.TinyMCE 1.3.6 is pinned by Plone 4.3.3's official versions, but I've tried upgrading it to 1.4.0, with the same result.

@fulv
Copy link
Member Author

fulv commented May 19, 2014

Also, another error I see in the Firebug console is:

"NetworkError: 404 Not Found - http://localhost:8080/mysite/homepage/undefined"

I have no idea where this is coming from.

@hvelarde
Copy link
Member

I think the problem is on the way collective.cover is trying to initialize the editor; unfortunately I can't help you on this as my JS knowledge is very basic. I think you're on the right path and probably what we need to fix is the cover.js script to make it compatible with plone.app.widgets.

we're gonna be working on that during the Symposium, but probably is too late for you.

sorry :-(

@cleberjsantos
Copy link
Member

@fulv @hvelarde

The problem is the version the plone.app.widgets 1.5.0, has been remove Products.TinyMCE dependency, also I think using plone.app.contenttypes 1.2a1 you also will have problems, the tested version with Plone 4.3.x is plone.app.contenttypes 1.1b1.

This problem is solved with pinned versions:

[versions]
plone.app.contenttypes = 1.1b1
plone.app.event = 1.1.1
plone.app.jquery = 1.8.3
plone.app.widgets = 1.4.0

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

No branches or pull requests

3 participants