Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
atrasatti CreditAttribution: atrasatti commentedIf 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.
Comment #2
atrasatti CreditAttribution: atrasatti commentedI 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.
Comment #3
jcisio CreditAttribution: jcisio commentedHello,
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.Comment #4
jcisio CreditAttribution: jcisio commentedhttp://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.
Comment #5
atrasatti CreditAttribution: atrasatti commentedCool 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.
Comment #6
atrasatti CreditAttribution: atrasatti commentedHey 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. ;)
Comment #7
jcisio CreditAttribution: jcisio commentedSorry atrasatti, I didn't have time. I fixed it by manually strip the javascript case by case.