Problems, need help? Have a tip or advice? Post it here.
8 posts Page 1 of 1
Hi

I'm trying to paste some HTML-Code (from PayPal) in the Backend.
However, it always shows up as Code in the finished page and not as rendered content.
I tried type "nicedit" and there the html is rendered in the backend but not on the finished page.

Any ideas, how i could solve this?

The page in question is http://modessoires.ch/schmuck2.php

thanks.
Hi Tobi,

That is because Couch tries to 'neutralize' what could possibly be malicious content.
You have two ways to proceed now -
1. If you have (or can have) a dedicated editable region just for the PapPal code, you can use a region of type 'textarea' and set its 'no_xss_check' parameter to '1' e.g.
Code: Select all
<cms:editable name='paypal' type='textarea' no_xss_check='1' />

2. If on the other hand the code has to be inserted anywhere within contents of the wysiwyg editor - use 'shortcodes'. Please see http://www.couchcms.com/docs/miscellane ... codes.html where the 5th example shows how to place insert PayPal donation button.

Hope this helps.
Hi KK, thanks for the quick answer. I think it SHOULD help, but it still doesn't work. I do have a 'textarea' field just for the paypal-code and the no_xss_check set to '1', still it doesn't work. Tried this before, since someone else recommended it in the forum, and now a second time, but it doesn't work. The Shorthands-solution doesn't work for me, because my client wants to create paypal-buttons by herself.
Any further ideas what I could be doing wrong?

When I look at the source code of the loaded page, the section starts with
&lt;form target=
instead of <form target=

even though the brackets around other elements in the code look "normal" e.g.
<table>

Seems strange to me, but maybe that's normal?
I do have a 'textarea' field just for the paypal-code and the no_xss_check set to '1', still it doesn't work. Tried this before, since someone else recommended it in the forum, and now a second time, but it doesn't work.

Strange as there is no reason why it wouldn't work.

I'd like to dig into the problem further. Could you please provide me with sufficient info to recreate the problem on my machine? If you could attach the very template that is displaying the problem as well as the PayPal code that you are trying to input, it would be helpful.
Alternatively (it'd be better for me), if possible, you can give me FTP/Couch access and I can study the problem first-hand.

Thanks.
Hi Tobi,

Thank you for entrusting me with the creds.

I had a look and, well, it seems you have hit upon a bug :(
The bug is that the 'no_xss_check' parameter takes no effect on a texarea when the region is used as a repeatable region.
So the problem basically lies with the repeatable region feature and not the textarea as it will work as expected when used as a standalone editable region.

I am attaching a fix to this problem.
Please delete the original 'repeatable.php' file within 'couch/addons/repeatable' folder and replace it with the fixed one contained in the attached zip.

IMP: please empty all textarea editable regions used in a repeatable manner and re-enter the PayPal code within them afresh.

Please let me know if this helped.
Thanks.

Attachments

Thank you!! Now it works like a charm. :D
Really great support!

Have a nice day, Tobi
A new problem showed up. In my clients browser of choice, Internet explorer, the admin panel looks like shown in the attached file and any new data entered is lost after saving. In safari, firefox, chrome it works.
The first three rows display correct, in the fourth, it "breaks" to the next line.
There are two radio buttons, which are "called upon" in the template as follows:

<cms:if Anzahl = '1 Artikel' >
<a href="<cms:show PayPal_Code />" target="_blank"><img src="images/warenkorb.jpg"></a>
<cms:else />
<cms:show PayPal_Code /></cms:if>

The error seems to occur when the second radio button is activated.

Maybe you have an idea what the problem could be?

Attachments

Hi Tobi,

IE woes continue :) It is not without reason that IE has earned its 'problem-child' status amongst browsers.

What can I say since Chrome, FF etc. are all displaying the repeatable regions correctly. It is a CSS issue and you as the web-designer can either try to solve it by putting your own rules in the stylesheet used or (more sanely) just ask your client to move to better browsers.

P.S. Would also like to suggest that if the number of fields in one row are so many that you need to scroll twice the width of the region, I think we'd be better off using a separate template to define those fields, create cloned pages for each row and then use the regular cms:pages tag to show them back on the front-end. This will be much cleaner. Just my two pence :)
8 posts Page 1 of 1