Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2023-03-01 14:20:35

lindabb
Member
Registered: 2023-02-17
Posts: 109

error_default

Will be nice to add something like this to error_default instead of showing blank page, new user like me may confuse as I did.
It took me awhile to figure it out,

<h1>This is default error page, you can customize this page from Admin > Presentation > Pages > error_default </h1>

Thanks

Offline

#2 2023-03-01 21:50:09

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

Re: error_default

Given that this text is output on the public side, wouldn’t it be confusing for simple site visitors?

Offline

#3 2023-03-01 22:23:57

lindabb
Member
Registered: 2023-02-17
Posts: 109

Re: error_default

Hi
I assumed when admin configure the site. but you are correct, if user installs everything default.

Thank you

Offline

#4 2023-03-01 22:42:15

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,208
Website GitHub

Re: error_default

Nothing to stop you or us employing this as an extra line in the default template:

<if::logged_in>
<p>This is the default error page. Customize this page from Admin > Presentation > Pages > error_default.
Create specific error templates for HTTP response codes via @error_nnn@ (where nnn is the response code).</p>
</if::logged_in>

The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#5 2023-03-01 23:16:01

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

Re: error_default

Bloke wrote #334841:

Nothing to stop you or us employing this as an extra line in the default template:

<if::logged_in>...

Nice idea, but wouldn’t it imply we need to add another text string, for translation?

Offline

#6 2023-03-02 00:29:57

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,027
Website

Re: error_default

etc wrote #334842:

Nice idea, but wouldn’t it imply we need to add another text string, for translation?

In the default theme the various template pages/forms are full of HTML comments explaining the various steps, etc. Those are all in English, with no translation – afaict.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#7 2023-03-02 12:41:11

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

Re: error_default

phiw13 wrote #334843:

In the default theme the various template pages/forms are full of HTML comments explaining the various steps, etc. Those are all in English, with no translation – afaict.

That’s right, but they are not intended for display. Anyway, theme authors are free to do what they want.

Offline

#8 2023-03-02 13:38:00

lindabb
Member
Registered: 2023-02-17
Posts: 109

Re: error_default

Thank you all,
Or can be something like this:
If ( testing or debug or logged) then
<h1>This is default error page, you can customize this page from Admin > Presentation > Pages > error_default </h1>
else assume live
anything to tell user something wrong , better than just blank page.

Thank you

Last edited by lindabb (2023-03-02 13:38:35)

Offline

#9 2023-03-02 13:55:28

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,208
Website GitHub

Re: error_default

Yeah, I’m kinda thinking this should be down to individual themes rather than baked into our default theme.

I’m just curious though, lindabb: you said “instead of showing blank page” but as far as I can tell, error_default shows the error message and code. Did that not show up for you? If so, is there any way you think we could reproduce it to see if it’s a bug?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#10 2023-03-02 14:21:05

lindabb
Member
Registered: 2023-02-17
Posts: 109

Re: error_default

Thank you Bloke,
Yes just blank page, I downloaded dev version (maybe 2 weeks ago) from
https://github.com/textpattern/textpattern
I was doing some test like typing invalid pages or add /remove slash / so on I was getting blank page,

Anyway , after I added my message error_default I started to see my message on error.

I’m using windows 10, php 8.1 Apache 2.4 all 64bit.

Hope this helps

Offline

#11 2023-03-02 14:28:36

lindabb
Member
Registered: 2023-02-17
Posts: 109

Re: error_default

I just tested again, logged in , Admin > Presentation > Pages > error_default
removed my message, saved, then went to my dev site, added just few lines pressed enter and blank page.
same issue with 4.8.8 on php 8.1

My test like this
http://localhost/textpattern/xxx (where xxx not valid page)

Hope this helps

Last edited by lindabb (2023-03-02 14:30:06)

Offline

#12 2023-03-02 23:29:07

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,208
Website GitHub

Re: error_default

Hmm, I wonder if this is a Windows thing, or some server configuration oddness. Or maybe a virtual host corner case? I’m running MAMP on macOS with Textpattern 4.9.0-dev, and if I visit localhost:8888/textpattern/qwertyuio, I get a 404 thrown, with the error message on-screen.

Interestingly, any attempt to access a resource in /textpattern/, besides index.php, triggers the public error_default template. I guess without index.php, it treats it like any old directory.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB