Streaming live at 10am (PST)

"Custom code is not validated" but WF will change it anyway


#1

Webflow claims not to validate custom code, in either an embed or custom site code, but then makes changes which completely break the code. This is a serious problem, one that’s cost me about 3 days of bug hunting various issues, only to find that each time it’s because WF has taken the liberty of ‘correcting’ my custom code. I’m definitely not a code wizard, but when I paste code that works perfectly in other sites of mine, I’d like it to stay identical.

When Webflow detects what it thinks is a code error, the user should be presented with a dialog box with the options [Accept changes and close], [Reject changes and close], [cancel]

And while I’m on the topic of WF changing code it thinks could be wrong, ALL links that don’t start with “http://” get it added to them, even when it shouldn’t be there.

Examples given in this thread and specifically in this post:


Here is my site Read-Only: https://preview.webflow.com/preview/pfss-2019-1?utm_source=pfss-2019-1&preview=bb56343e124e2aec369d8bf770388f1c
Here is my published site: https://www.puzzlefactory.uk/2019


#4

Hi @daxliniere

Thanks for sharing your feedback here.

To clarify this is expected behavior and not a bug. The reason this code was changed is because you were using PHP as you mentioned in your other thread. Custom PHP isn’t supported by Webflow in the custom code fields or embeds. You can use HTML, CSS, or Javascript, but any server side language won’t work here. This may change in the future, but this is expected behavior currently.

I’ve let the team know about this so we can update our education material and maybe add a note in our UI to avoid issues like this in the future.

If you 100% need this integration, you may consider exporting the project and hosting with a third party provider so you can include this custom PHP.

Hope this makes sense and let me know if you have other questions.


#5

Hi Brando,
Thanks for your reply. The site will be published offsite and is in fact already online (link at the bottom of my original post).

The problem is that WF performs validation when it says it will not. To reiterate, when Webflow detects what it thinks is a code error, the user should be presented with a dialog box with the options [Accept changes and close], [Reject changes and close], [cancel]

Adding this functionality would not remove or restrict any existing functionality, so would not disadvantage any WF users. Simply adding an explanatory warning is a lazy solution, much like shopping malls that put “caution: wet floor” signs everywhere instead of actually cleaning up the wet floors.

This change could only bring about benefits.

Just to be clear, I don’t expect WF to execute PHP code, I just don’t want WF to change it when I use it.

Best regards,
Dax.


#6

I should mention that the other issue about WF adding http:// to every link is still yet to be addressed.
This is unrelated to and unaffected by the claim that WF doesn’t support PHP.

Cheers!
Dax.


closed #7

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.