Hello,

Nokia_theme doesn't filter CKEditor scripts. Example http://ttcn.mobi/article/15569

I'll investigate deeply. Looking at the script positions, it seems that it doesn't use drupal_add_js('header'...)

Comments

atrasatti’s picture

Priority: Normal » Minor

If CKEditor adds the CSS files without using the normal drupal_add_js, the theme will not filter them as it would not even know they are there.

atrasatti’s picture

Status: Active » Postponed (maintainer needs more info)

I installed CKEditor drupal plugin 1.1 and downloaded CKEditor 3.2 from the official site. I created a couple of articles including some styling and published.

I tested using both mobile tools and mobile plugin and in both cases the CKEditor CSS files were NOT published on the mobile site, while they were present on the desktop site.

What mobile plugin are you using, if any at all?

Also, your site seems to be using jQuery to load CSS style and those of the mobile site that would be supposed to be there don't seem to be listed properly. Are you sure you are not using some other plugin that interferes?

CKEditor also creates a very nice textarea for comment submission, but I doubt that will be of any use to mobile users except possibly for really high-end devices like the N900 or iPhone.

To me this is a "won't fix". Please, report back or I'll close this.

jcisio’s picture

Status: Postponed (maintainer needs more info) » Active

Hello,

I meant the Javascript. You see a line like this <script type="text/javascript" src="/sites/all/libraries/ckeditor/ckeditor.js?I"></script> in your page head, don't you? For CSS, CKeditor loads it by Javascript (to make sure that the iframe of CKEditor textarea has the same CSS properties as the whole page), so, if the theme can filter JS, it would be ok.

I use CKEditor 6.x-1.1, CKEditor 3.2, mobile_tools (latest) to change the theme, and the latest stable nokia_mobile. CKEditor does not use drupal_add_js (I submitted another issue), maybe to be able to load hosted version of the editor. For this case, I think it is possible for theme to filter CSS/JS like this by modifying $head and $foot on the preprocess page hook.

jcisio’s picture

http://drupal.org/project/jquery_update use hook_preprocess_page, too. Those scripts aren't filtered.

I tried to modify the weight parameter (nokia_mobile = 100, jquery_update = 99), but it didn't help.

atrasatti’s picture

Cool jcisio,
thank you for the work. I will look more into this issue next week, I hope, but of course if you have the time to find a solution earlier than that I'll be happy to review and hopefully add it to the next release.

atrasatti’s picture

Assigned: Unassigned » atrasatti

Hey jcisio any update on this? Did you get a chance to look at it? I did not, yet, so I was hoping you fixed it. ;)

jcisio’s picture

Sorry atrasatti, I didn't have time. I fixed it by manually strip the javascript case by case.