Landing Pages From Tilda add-on

Did anyone use this add-on? Once it is connected I replaced the home page with the page from Tilda.

It doesn’t load successfully though, the following error is in the browser console:

Uncaught TypeError: Cannot set property origin of [object Location] which has only a getter
    at script.js:1:184700
    at script.js:1:184808
    at script.js:1:185548
(anonymous)	@	script.js:1

It is gone after I patched the script.js file in var/files/tilda directory however I am looking for a better and solid solution.

Hello

We have the same problem. Generally, there is a problem with concat .js files. Some of the tilda pages do not want to work. We wrote to Tilda support and that is what they wrote to us, that there is a problem with concat js files. We tried to solve it ourselves but we were unsuccessful.

Best regards
Robert

1 Like

Hi Robert, thank you for writing this. Please keep me and community updated about the solution if possible.

Hi!

Unfortunately, this is a known bug in the current version of CS-Cart, which is currently being fixed. We will let you know once the fix is ready.

1 Like

Thank you, will await for solution. For now fixed the script file.

Replace:

catch(t){window.location.origin=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")}}(),

with this code:

catch(t){if(!("origin" in window.location))window.location.origin=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")}}(),

And added cron job to avoid re-writing from Tilda.

I hope you will find the better way to fix it.

1 Like

Hello

Where did you put it code? How did you do it?

Best regards
Robert

It is the js file uploaded from Tilda automatically to var/files/tilda/page_xxxxxxxx/js directory.