Go to main content

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,639
GitHub Twitter

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 | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

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

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,093
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

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

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,639
GitHub Twitter

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 | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

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

etc
Developer
Registered: 2010-11-11
Posts: 5,236
Website GitHub

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,639
GitHub Twitter

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

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


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

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

etc
Developer
Registered: 2010-11-11
Posts: 5,236
Website GitHub

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: 9,093
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

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

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,639
GitHub Twitter

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 | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

Board footer

Powered by FluxBB