[solved] Wysiwyg not working in frontend

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
leximus
Forum Members
Forum Members
Posts: 51
Joined: Fri Oct 20, 2006 8:57 pm

[solved] Wysiwyg not working in frontend

Post by leximus »

Hi,

I'm currently setting up CGFeedback on my site and it's simply a great and powerful tool!

I'm almost done with the setup, but for any reason, I don't get the Wysiwyg editor to work in the frontend.
I've already searched the forum and tried a lot of things, but it still doesn't work as I want it to. Here's what I've done and achieved so far:
  • Feedback module is working correctly without wysiwyg. Form is displayed in a colorbox with inline HTML.
  • The Checkbox to use a wysiwyg editor is displayed but clicking it doesn't have any effect. (although the checkbox is working correctly in backend)
  • All comments are displayed as they should, but of course without formatting.
  • I already tried Tiny andFCKeditor - both don't show up. Currently I'm trying it with Tiny.
  • Both editors are working correctly in the backend.
  • Tiny is set up as frontend wysiwyg in Site admin Global settings.
  • Tiny preferences: "Show checkbox to turn wysiwyg on/off" is on and showing up the box as described above.
  • CGFeedback preferences: "Allow use of the wysiwyg editor for comments?" is set to yes.
  • When I try to display the form without colorbox, it's the same problem, so I guess the problem has nothing to do with colorbox.
*Edit: I just noticed, that the wysiwyg editor doesn't show up at all in the frontend, even when using another module than CGFeedback. I tried it with formbuilder and it's exactly the same problem... Therefore I adjusted the subject of this topic.


So this is where I am so far, I guess I've forgotten something?! I'm using the current versions of the concerned modules and CMSMS version is 1.9.4.2.
Thanks a lot for any suggestions...

Many greetings from Luxembourg,

Lex
Last edited by leximus on Mon Apr 09, 2012 9:28 pm, edited 2 times in total.
stevew
Forum Members
Forum Members
Posts: 74
Joined: Wed May 21, 2008 7:02 am

Re: Wysiwyg and CGFeedback

Post by stevew »

Have you tried logging out of the admin side, and then seeing how it looks from the front end?
leximus
Forum Members
Forum Members
Posts: 51
Joined: Fri Oct 20, 2006 8:57 pm

Re: Wysiwyg and CGFeedback

Post by leximus »

Yes, but unfortunately it makes no difference...
stevew
Forum Members
Forum Members
Posts: 74
Joined: Wed May 21, 2008 7:02 am

Re: Wysiwyg not working in frontend

Post by stevew »

Pity! It works for me (logged in, frontend WYSIWYG is gone; logged out, frontend WYSIWYG is back).

The only other thing I can see is the "Allow commenter to include HTML in comments" option, which should be set to No.
leximus
Forum Members
Forum Members
Posts: 51
Joined: Fri Oct 20, 2006 8:57 pm

Re: Wysiwyg not working in frontend

Post by leximus »

Unfortunately this option is already set to no... ;)
chrismarie

Re: Wysiwyg not working in frontend

Post by chrismarie »

Hi leximus, did you ever find a solution for this issue? I'm having the same problem with TinyMCE on the frontend. I'm using 1.9.4.2 and the latest version of all modules, and the WYSIWYG isn't showing up on the change settings page for frontend users. I've thoroughly checked all my settings as you have and still can't get the thing to show up.

I have another installation running 1.9.4 that shows Tiny on the frontend (and yet another v.1.9.4.1), but they're both hosted on different servers, so I can't establish whether it's the server or the CMS version. I'm scared to check because I don't want to upgrade and lose it :)

I'm going to keep troubleshooting - I'll let you know what I find.
chrismarie

Re: Wysiwyg not working in frontend

Post by chrismarie »

Got it! I wasted a lot of time reuploading and screwing with permissions, then decided to check the source of a working page and the problem page, and in the header of the site with working tiny, this was present:

Code: Select all

<!-- TinyMCE Configuration --><__script__ type="text/javascript" src="/modules/TinyMCE/tinymce/jscripts/tiny_mce/tiny_mce.js"></__script><__script__ type="text/javascript" src="/index.php?mact=TinyMCE,cntnt01,tinyconfig,0&cntnt01templateid=23&cntnt01languageid=en&cntnt01frontend=yes&cntnt01returnid=56&showtemplate=false"></__script><!-- TinyMCE Configuration -->
In the new site, it's missing. Adding it manually to the header of my template (just for the sake of testing) got Tiny to work on the frontend. Looks like it's not a server issue.
leximus
Forum Members
Forum Members
Posts: 51
Joined: Fri Oct 20, 2006 8:57 pm

Re: Wysiwyg not working in frontend

Post by leximus »

Sorry for the long period without answering. I tried your suggestion Chrismarie, but unfortunately it didn't work for me.
Does anybody have another idea?
Thanks...
chrismarie

Re: Wysiwyg not working in frontend

Post by chrismarie »

Try this:

Code: Select all

{literal}
<__script__ language="javascript" type="text/javascript" src="/modules/TinyMCE/tinymce/jscripts/tiny_mce/tiny_mce.js"></__script>
<__script__ language="javascript" type="text/javascript">
tinyMCE.init({
        theme : "advanced",
        mode : "textareas",
        plugins : "spellchecker, paste",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_buttons1 : "bold,italic,underline,separator,cut,copy,paste,pastetext,pasteword,selectall,separator,link,unlink,
separator,bullist,numlist,separator,undo,redo,separator,hr,charmap,sub,sup,separator,spellchecker",
        theme_advanced_buttons2 : "",
        theme_advanced_buttons3 : ""
});
</__script>
{/literal}
virtusrex
New Member
New Member
Posts: 4
Joined: Thu Jun 30, 2011 5:45 pm

Re: Wysiwyg not working in frontend

Post by virtusrex »

Hello,

I'm getting the same problem. I have the following setting:

CMS Version

1.9.4.2

Installed Modules

CMSMailer

2.0.1

FileManager

1.1.0

MenuManager

1.7.6

ModuleManager

1.4.2

News

2.11.3

nuSOAP

1.0.2

Printing

1.1.2

Search

1.6.10

ThemeManager

1.1.4

TinyMCE

2.9.1

Captcha

0.4.3

CGSimpleSmarty

1.4.8

CGExtensions

1.26.6

CGBlog

1.7.5

CGFeedback

1.3.5

CGFeedMaker

1.0.14

Products

2.13.3

I tried chrismarie fix, but it didn't work.

Any ideas???

VirtusRex
virtusrex
New Member
New Member
Posts: 4
Joined: Thu Jun 30, 2011 5:45 pm

Re: Wysiwyg not working in frontend

Post by virtusrex »

Hi leximus,

I was having the same problem, but managed to correct it by resetting my TinyMCE to default settings which seemed to fix the problem.

TinyMCE is now showing in my CGFeedback module when I edited feedback comments.

As for the webpage frontend, I used a modification of chrismarie example which got tinymce up and running for my users to enter comments into.

I was also having a problem where the feedback was in special html characters. ie "<a title="google" href="http://google.com" target="_blank">google</a></p>".

To fix this problem, I went into the CGFeedmoduel->summary template->sample and change {$one.data||htmlspecialchars} to {$one.data|htmlspecialchars_decode}, which then turned my special html characters back to normal characters.

Hope this helps,

VirtusRex
leximus
Forum Members
Forum Members
Posts: 51
Joined: Fri Oct 20, 2006 8:57 pm

Re: Wysiwyg not working in frontend

Post by leximus »

Thanks for all the suggestions.

Finally I got it working. Since I started working on it, a new version of tiny has become availabe, I did the update to 2.9.1 and now it works for me... :)

But there's still a problem left: I am using colorbox to display the form to add a comment and tiny doesn't work in it. Tiny works fine if I don't use colorbox, and colorbox works fine if I don't use tiny ;)
In the attached image file you can see what it looks like: the editor appears, but the text area has the background color and it is impossible to write in it and to click the icons on the toolbar.

This is where colorbox is defined in the head:
<__script__ type="text/javascript">

$(document).ready(function(){

$(".kommentar").colorbox({width:"750", height:"540", inline:true, href:"#kommentarbox"});

});

</__script>
And this is where it is finally called and the form itself:
<div id="kommentarbox" style="padding: 5px; background: #ffff00;">
<h1>Eppes an d'Gëlle Buch androen</h1>
<br /> <div class="cgfeedback_addcoment">
<form id="m74e64moduleform_2" method="post" action="http://www.groupe-animateur.lu/index.ph ... gelle-buch" class="cms_form">
<div class="hidden">
<input type="hidden" name="mact" value="CGFeedback,m74e64,default,0" />
<input type="hidden" name="m74e64returnid" value="3" />
<input type="hidden" name="m74e64key1" value="Gëlle Buch" />
<input type="hidden" name="m74e64key2" value="x" />
<input type="hidden" name="m74e64key3" value="Groupe Animateur" />
<input type="hidden" name="m74e64feedback_origurl" value="http://www.groupe-animateur.lu/index.ph ... gelle-buch" />
</div>


<table>
<tr>

<td align="right">Ären Numm: </td><td align="left"><input type="text" name="m74e64author_name" size="30" maxlength="255" value=""/></td>
</tr>

<tr>
<td align="right">Är Emailadress:</td><td align="left"><input type="text" name="m74e64author_email" size="30" maxlength="255" value=""/></td>
</tr>

<tr>
<td align="right">Titel vun Ärem Kommentar:</td><td align="left"><input type="text" name="m74e64title" size="40" maxlength="255" value=""/></td>
</tr>
</table>


<table>
<tr>
<td align="left">Äre Kommentar:</td>
</tr>
<tr>
<td><textarea name="m74e64comment" cols="80" rows="15" class="cms_textarea"></textarea></td>
</tr>
</table>

<br>
<table>
<tr><td align="center"><input type="hidden" name="hncaptcha" value="11332323133331113333233133132312"/>
<input type="hidden" name="hncaptcha_public_key" value="65ce3"/>

<img class="captchapict" src="/tmp/cache/hn_captcha_65ce3.jpg" width="198" height="72" alt="This is a captcha-picture. It is used to prevent mass-access by robots. (see: http://www.captcha.net)" title="">

</td><td></td></tr>

<tr><td align="left">
Gitt w.egl. d'Zeechen an, déi dir am Feld hei uewendriwwer gesitt:
</td>

<td>
<input type="text" name="m74e64feedback_captcha" value="" size="20"/>
</td>
</tr>
</table>




<br>

<input type="submit" name="m74e64submit" value="Androen"/ >



</form>

</div>
</div>
And here you can see it in action:
http://www.groupe-animateur.lu/index.ph ... gelle-buch

For those few people who don't speak luxembourgish, the first link calls the form :). At the moment the wysiwyg editor is deactivated, therefore it works.

So I would be very happy if anybody had an idea how to fix this or could tell me if this is impossible with colorbox...

Thank you very much!
Attachments
tinynotworking.jpg
SimonJ

Re: Wysiwyg not working in frontend

Post by SimonJ »

chrismarie wrote:Got it! I wasted a lot of time reuploading and screwing with permissions, then decided to check the source of a working page and the problem page, and in the header of the site with working tiny, this was present:

Code: Select all

<!-- TinyMCE Configuration --><__script__ type="text/javascript" src="/modules/TinyMCE/tinymce/jscripts/tiny_mce/tiny_mce.js"></__script><__script__ type="text/javascript" src="/index.php?mact=TinyMCE,cntnt01,tinyconfig,0&cntnt01templateid=23&cntnt01languageid=en&cntnt01frontend=yes&cntnt01returnid=56&showtemplate=false"></__script><!-- TinyMCE Configuration -->
In the new site, it's missing. Adding it manually to the header of my template (just for the sake of testing) got Tiny to work on the frontend. Looks like it's not a server issue.
Perfect answer, works here! :) Thank you.
Post Reply

Return to “Modules/Add-Ons”