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

Tinymce/bbcode #614

Closed
tgtje opened this issue Jun 2, 2014 · 35 comments
Closed

Tinymce/bbcode #614

tgtje opened this issue Jun 2, 2014 · 35 comments
Assignees
Labels
status: duplicate This issue is being or has been addressed by another issue. type: bug A problem that should not be happening
Milestone

Comments

@tgtje
Copy link
Contributor

tgtje commented Jun 2, 2014

USING news create OR Page (files age : latest 5 hours ago) 2-6
INPUT AREA (window : body)

Upgrade of v1 to v2 : succeeded with 1 solvable issue : new issue made/making> forum related issue =upgrade )

Creating news and/or pages

(as installed = tinymce4 Upgraded site
trying to add youtube etc.
When selecting youtube it opens media manager news : youtube (2 movies); not selectable
Adding an image : media m.. displayed : not selectable

adding youtube embedding code ( i frame ) works, txt works. Trying to use any image or related > not selectable

Here are some error reports
Tijdstempel: 2-6-2014 14:44:05
Fout: TypeError: $(...).tooltip is not a function
Bronbestand: http://domain/e107_web/js/core/admin.jquery.js?1401712003
Regel: 76 = $(this).tooltip({opacity:1.0,fade:true, placement: pos});

When creating news selecting an image at bottom (first block)
it opens mediamanager.Selecting an image shown. marks it, but does NOT close the dialog : no file selection (closing window)

Tijdstempel: 2-6-2014 14:52:14
Fout: TypeError: parent.document.getElementById(...) is null
Bronbestand: http://domain/e107_admin/image.php?mode=main&action=dialog&for=news&tagid=news-thumbnail-0&iframe=1&video=1
Regel: 1

Tijdstempel: 2-6-2014 14:56:25
Fout: TypeError: e is undefined
Bronbestand: http://tinymce.cachefly.net/4.0/tinymce.min.js?1401712003
Regel: 9

Tijdstempel: 2-6-2014 15:02:11
Fout: TypeError: $(...).draggable is not a function
Bronbestand: http://domain/e107_web/js/core/admin.jquery.js?1401712003
Regel: 82

Uninstalled Tinymce4
Installed Tinymce

In BOTH cases i have NO possibilties to add media related
Preferences adjusting (disabling wysiwig) does NOT change display of window or makes changes to method for input

Tijdstempel: 2-6-2014 15:04:47
Fout: TypeError: tinymce is null
Bronbestand: http://domain/e107_plugins/tinymce/tiny_mce_popup.js?1401712003
Regel: 5

basically i can not create a page or news post WITH media

@nlstart nlstart added this to the v2.0 alpha 2 milestone Jun 5, 2014
@Moc Moc modified the milestones: v2.0 alpha 3, v2.0 alpha 2 Jun 6, 2014
@Moc
Copy link
Member

Moc commented Jun 8, 2014

Which browser is this?

@tgtje
Copy link
Contributor Author

tgtje commented Jun 8, 2014

Firefox mainly, also in use (partial when testing) Opera and , IE 11 (troublesome overall) Chrome
Needs re-testing due to changed files...

@tgtje
Copy link
Contributor Author

tgtje commented Jun 9, 2014

9th June ; latest files browsers Opera IE11 Chrome and Firefox
Tinymce 4 does NOT display the bb code panel (no not the one from non wysiwig). Only IE seems to'blimp'for a fraction of a second.

This happens on a live (test) server as new install and also as an update.

Screenshot of IE11 ( the 'blimp') where all other 3 browsers do not want to do (display) anything at all.

screenshot039

@Jimmi08
Copy link
Contributor

Jimmi08 commented Jun 10, 2014

Maybe related? #624 See my second comment.

@Moc
Copy link
Member

Moc commented Jun 18, 2014

What PHP version do you have running @tgtje ?

@Moc Moc removed this from the v2.0 alpha 3 milestone Jun 18, 2014
@willem010
Copy link

i just double checked,
(my host offers a selector for php version, but this defaults to 5.3 (native) )
when i use that default version, no tinymce4.
it doesnt render and the textarea looks like a default text area.
(shows errors like you see in screenprints in this topic.)

when i set it to 5.5, problem is solved
clearly this is a php version issue

@Jimmi08
Copy link
Contributor

Jimmi08 commented Jun 18, 2014

The same here, but I can switch only to 5.4 version, 5.3. is native too. With 5.4 no problems.

@willem010
Copy link

yep.. after some testing, 5.4 is definitely the best version my setup.
when using 5.5 i notice my logs filling up with lot's of depricated msgs and errors on my plugins :D

  • auch - that will leave a mark :P

@Moc
Copy link
Member

Moc commented Jun 18, 2014

Willem, if you see any notices related to the e107 core (plugins) please let me know in a separate issue and I'll look into them to see if we can already get rid of them.

@willem010
Copy link

sure.
the rss output plugin, is this considered a core plugin?
if so, i will create a new topic ;)

@Moc
Copy link
Member

Moc commented Jun 18, 2014

Yes, although it's a very old one in need of a rewrite. Just post them up, all in one issue (not for every plugin a different issue but just in one issue) and I'll take a look at them. Thanks!

@willem010
Copy link

no problem.
i will test as much core plugins as i can for the php version problems and report it in one issue.

@Moc Moc added bug and removed testing required labels Jun 18, 2014
@tgtje
Copy link
Contributor Author

tgtje commented Jun 18, 2014

php 5.3.27 & php 5.3.28

Mind ! these are basic (shared) hosting versions, no possibility to change php versions.
So testing on pc will most of the times differ from actual LIVE issues.
Not all hosters do run with php 5.4 (or upwards)

5.3.x should be sufficient,; 5.4 ( or higher) as minimum requirement is (imo) a no go .

@Moc
Copy link
Member

Moc commented Jun 18, 2014

@tgtje Yep, that's why the current requirement is still PHP 5.3 (which is over 5 years old!). Hosts should definitely be looking into upgrading onto PHP 5.4 in the next year or so.

Anyhow, this issue is narrowed down to a PHP 5.3 incompatibility. No issues on PHP 5.4+
Not sure how to approach this to be honest. Any suggestions @CaMer0n? Also see #624

@nlstart nlstart added this to the v2.0 alpha 3 milestone Jun 18, 2014
@willem010
Copy link

funny,
Zyma did exactly that last night.
5.4 now has been set as native version.

(which renders some of my own plugins useless, so i needed to revert to 5.3
in the end)

after some testing i didnt find new problems or core plugins
.
tinymce4 doesnt work on 5.3 but thats now known to be an issue,
rss out doesnt like 5.4 and up. for news items containing html
and doesnt work at all for downloads.
(i will open an issue for this if you want me to)

i have done a quick test on the forum and that seems to work better with 5.4
i think some issues on the forum authorisation are due to using 5.3
but this needs more testing to be sure.

@Moc
Copy link
Member

Moc commented Jun 21, 2014

and doesnt work at all for downloads. (i will open an issue for this if you want me to)

Yes please, I'll take a look. Not sure what's wrong as that plugin works properly on PHP 5.4 here and o many other installations.

i think some issues on the forum authorisation are due to using 5.3
but this needs more testing to be sure.

Would be great to have this confirmed.

@Moc
Copy link
Member

Moc commented Jun 24, 2014

@tgtje
Copy link
Contributor Author

tgtje commented Jun 25, 2014

adding : running php 5.3.28
issue is the display style > none (it hides in all browsers; posted
before as 'blimp'only in IE 11 )

@Jimmi08
Copy link
Contributor

Jimmi08 commented Jun 25, 2014

tgtje, could you click on console tab and insert picture here if there isn't javascript problem? Thanks
By the way, your video is fantastic.

@Jimmi08
Copy link
Contributor

Jimmi08 commented Jun 25, 2014

Only notice: there is in e_meta.php in tinymce4 used mceAddControl and I found: "they removed mceRemoveControl and mceAddControl in tinymce4, so use mceAddEditor and mceRemoveEditor instead."

@tgtje
Copy link
Contributor Author

tgtje commented Jun 26, 2014

@Jimmi08 here's a pic, notice : the only error is 'made' from the 'outside". eg. external call
as for the notice: i changed those 2 ( Add x2 Rem x1) but does not show any change.

screenshot043

used this time the create page instead of add news, since it is the same issue.
(none set to inline)

@Jimmi08
Copy link
Contributor

Jimmi08 commented Jun 26, 2014

But look what happend if I change display:none on php5.4 installation:
image
You are missing the second div section in your code.

@Jimmi08
Copy link
Contributor

Jimmi08 commented Jun 26, 2014

Weird thing is that in source code when I clink on wysiwyg.php with tinymce init, there is in 5.4:
image
but in 5.3 there is only:
image
this is reason for javascript error, tinymce is not set correctly.
@tgtje could you check yours? in chrome CTRL-U, find wysiwyg.php and see in it. Thanks.

@tgtje
Copy link
Contributor Author

tgtje commented Jun 26, 2014

done as asked (by Chrome clicking link for wysiwig)

image

@Jimmi08
Copy link
Contributor

Jimmi08 commented Jun 26, 2014

Yes, exactly, so this is not inserted in php 5.3:
image
I know nothing about json, so somebody else need to help. But we found the reason why tinymce4 doesn't work in 5.3, I think.

@Moc
Copy link
Member

Moc commented Jun 26, 2014

@tgtje On line 102 of e107_plugins/tinymce4/wysiwyg.php change this:

$text .= json_encode($this->config, JSON_PRETTY_PRINT);

to

$text .= json_encode($this->config);

Please re-test the issue, and check the source code. If the source code is different, please post another image.

@tgtje
Copy link
Contributor Author

tgtje commented Jun 27, 2014

retest working
img :
screenshot044

identical sourcecode in Chrome now shows :

 /* TinyMce Config: Main Admin */

tinymce.init({"selector":".e-wysiwyg","theme":"modern","plugins":"advlist autolink lists link image charmap print preview hr anchor pagebreak searchreplace wordcount visualblocks visualchars code fullscreen        insertdatetime media nonbreaking save table contextmenu directionality emoticons template paste textcolor","language":"en","menubar":"edit view format insert table tools","toolbar1":"undo redo | styleselect | bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | e107-image e107-video e107-glyph | preview","external_plugins":{"e107":"/e107_plugins/tinymce4/plugins/e107/plugin.js","example":"/e107_plugins/tinymce4/plugins/example/plugin.js"},"image_advtab":true,"extended_valid_elements":"i[*], object[*],embed[*],bbcode[*]","convert_fonts_to_spans":false,"content_css":"http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css"});

@tgtje
Copy link
Contributor Author

tgtje commented Jun 27, 2014

As a notice: investigating why this option (code) change to understand; i found this : probably the reason for it :

  • jsonpp - Pretty print JSON data
    *
    • In versions of PHP < 5.4.x, the json_encode() function does not yet provide a
    • pretty-print option.

http://ryanuber.com/07-10-2012/json-pretty-print-pre-5.4.html
https://gist.github.com/GloryFish/1045396

@Moc
Copy link
Member

Moc commented Jun 27, 2014

Yeah the 'pretty print' option is only available since PHP 5.4. That's why the config fields aren't filled properly, and that's why TinyMCE won't show up on PHP 5.3.

I don't really get why it's not throwing a more accurate error though. Did you try enabling the debug mode to find PHP errors/warnings?

I'm going to verify with @CaMer0n if it's ok to use this fix. The only difference is that the JSON is not outputted nicely (properly formatted, but all in one row) in the source code. Functionality wise, nothing else changes. I have found a workaround in case we'd prefer to have a nicely formatted sourcecode: https://github.com/GerHobbelt/nicejson-php

@tgtje
Copy link
Contributor Author

tgtje commented Jun 27, 2014

Yes, multiple times (using FF and debugger ) it will not show any
errors, just some notices (related to plugins)

@Moc
Copy link
Member

Moc commented Jun 27, 2014

Ah well, we found the error anyway, thanks to you @tgtje and @Jimmi08 !

As I said in my previous reply, I'll need to verify with Cameron to see what fix we'll implement for this, but it should be sorted soon :)

@Moc
Copy link
Member

Moc commented Jun 27, 2014

Pushed the temporary fix anyway, for the time being.

@Moc Moc self-assigned this Jun 27, 2014
@Moc
Copy link
Member

Moc commented Jul 1, 2014

@tgtje Are the issues fixed now?

@tgtje
Copy link
Contributor Author

tgtje commented Jul 1, 2014

for me the small change does work.

Just have to reinstall a new pack, since (reason unknown) media manage
is becoming very sluggish..
(do not think it is related)

@Moc
Copy link
Member

Moc commented Jul 1, 2014

Ok, closing this issue. Please open up a new issue in case of new issues.

@Moc Moc closed this as completed Jul 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate This issue is being or has been addressed by another issue. type: bug A problem that should not be happening
Projects
None yet
Development

No branches or pull requests

5 participants