I have struggled with this several hours now.

Backdrop seems to edit code for  paypal buttons except the first one so that they don't work.

Code is added in 'raw' format and all html 'fixes' are disabled - why does backdrop change this code?

I thought raw meant raw.

For some reason the older paypal buttons work fine. The problem is that new ones are needed for credit card payments on smartphones

This is the page: https://bd.buddhistisksamfund.dk/butik

Comments

Hi ...,

From my experience raw, change your text/code unless you have filters applied to the text format.

It looks like your page content is inside the PayPal form...

Edit your text "source" and make sure you don't have any code inside the Paypal code/form

Olafski's picture

Hi Egmund, can you post the original code and tell which part exactly gets removed?

(To post the original code, you use the "Insert code block" button of the editor.)

 

This is orig. code. Backdrop removes the form action and insert an end-form later (or move it down).

<div>
 <style>.pp-VTRXBASDR9YR8{text-align:center;border:none;border-radius:1.5rem;min-width:11.625rem;padding:0 2rem;height:2.625rem;font-weight:bold;background-color:#FFD140;color:#000000;font-family:"Helvetica Neue",Arial,sans-serif;font-size:1rem;line-height:1.25rem;cursor:pointer;}</style>
 <form action="https://www.paypal.com/ncp/payment/VTRXBASDR9YR8" method="post" target="_blank" style="display:inline-grid;justify-items:center;align-content:start;gap:0.5rem;">
   <input class="pp-VTRXBASDR9YR8" type="submit" value="Køb nu" />
   <img src=https://www.paypalobjects.com/images/Debit_Credit_APM.svg alt="cards" />
   <section style="font-size: 0.75rem;"> Leveret af <img src="https://www.paypalobjects.com/paypal-ui/logos/svg/paypal-wordmark-color.svg" alt="paypal" style="height:0.875rem;vertical-align:middle;"/></section>
 </form>
</div>

I have though removed the faulty parts of page and am playing with paragraphs and custom blocks, but see no way to sort paragraphs.

Sorry, couldn't wait

Make sure that ckeditor or tinymce is not enabled for that filter. Especially ckeditor is opinionated and will change the html.

I have tried ckeditor  tinymce and 'nothing' - same results, code get messed up. Something is 'fixing' and instead messing up.

If there is no way to have actually raw html in BackdropCMS then I can no longer recommend it.