Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2019-10-02 08:56:23

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,292
Website

Flat form calls with console browser error [Solved]

I activated the “Advanced Preferences”; I removed all comment lines into the default config for JS support; I associated my js code to the new form type; I exported the form to the server; finaly I called this form by the following tag (I don’t need some magic TXP dynamic processes for this js code 😜):

<txp:output_form form="footer_js" format="flat.script" />

Unfortunatly, the ressource isn’t loaded and the browser imform me an error occurs:

The resource from “https://domain.tdl/?f=footer_js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).

Could you tell me, please, where I’m fail? I’m lost… 😕

(I got the same error even with this: <txp::footer_js format="flat.script" />)

Last edited by Pat64 (2019-10-02 09:27:44)


Patrick.

Github | CodePen | Simplr theme | Wait Me a maintenance theme

Offline

#2 2019-10-02 09:19:36

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,320
Website

Re: Flat form calls with console browser error [Solved]

Did you try using <txp:output_form form="footer_js.js" format="flat.script" />. Notice the .js at the end of the form name which actually should be included.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#3 2019-10-02 09:27:22

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,292
Website

Re: Flat form calls with console browser error [Solved]

Absolutely, you’re right Yannis! Thank you lot! 😃

The form name need a .js file extension, too.

Are-you a master in Textpattern? I’m sure you are. 👌

Last edited by Pat64 (2019-10-02 09:28:56)


Patrick.

Github | CodePen | Simplr theme | Wait Me a maintenance theme

Offline

#4 2019-10-02 09:30:57

etc
Developer
Registered: 2010-11-11
Posts: 3,296
Website

Re: Flat form calls with console browser error [Solved]

Yep, I think Yiannis (hi) is right master. Flat scripts are served by Apache, txp is only creating links. And footer_js is certainly served as text/html. So, either give your form .js extension (better) or use format="script" attribute.

We should probably allow . (period) in txp tags, currently <txp::footer.js /> form will not work.

Offline

#5 2019-10-02 09:38:02

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,292
Website

Re: Flat form calls with console browser error [Solved]

Sure you are a master, too. Oleg (but just after Yannis) 😃


Patrick.

Github | CodePen | Simplr theme | Wait Me a maintenance theme

Offline

#6 2019-10-02 09:44:26

etc
Developer
Registered: 2010-11-11
Posts: 3,296
Website

Re: Flat form calls with console browser error [Solved]

Pat64 wrote #319484:

Sure you are a master, too. Oleg (but just after Yannis) 😃

He is just better trained (>7000 posts)

Offline

#7 2019-10-02 10:00:32

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,320
Website

Re: Flat form calls with console browser error [Solved]

Pat64 wrote #319482:

Are-you a master in Textpattern? I’m sure you are. 👌

Not really. I just have an undergraduate degree in it:)


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#8 2019-10-02 10:03:11

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,292
Website

Re: Flat form calls with console browser error [Solved]

😃

That’s why I’m falling in love with Textpattern and its great community!

Thanks lot you, mates.


Patrick.

Github | CodePen | Simplr theme | Wait Me a maintenance theme

Offline

Board footer

Powered by FluxBB