Posts: 120
Threads: 22
Joined: Dec 2015
2017-09-21, 14:25:18
(This post was last modified: 2017-09-23, 02:10:24 by jwzumwalt.)
Create New Page From 404 "Page Not Found" Error
http://get-simple.info/extend/plugin/cre...rror/1110/
This plugin will add a [create missing page] page link to a 404 "page not found" error if the user has "admin" privileges.
This GS plugin by Dmitry Yakovlev was made as a favor for me. Dmitry had no intent on making this a supported GS plugin. I have found this plugin so convenient and useful that I created installation instructions and made the universal template so others could use the plugin without modification.
This should work with all past and future versions of GS. However no support or future enhancements should be expected!!!
Included with this package are two screenshots of the plugin in action.
"Screenshot-1.png" is an example of the basic "template-404.php" provided
"Screenshot-2.png" is an example of the "template-404-Summit-Theme.php"
Thanks,
jwzumwalt
(\__/)
(='.'=)
(")_(")
Posts: 423
Threads: 15
Joined: Mar 2011
This isn't really necessary. You can just create a page, make the custom slug 404 and it will override the built-in error page ( GS wiki)
You can do the same thing for 410 (Page Gone).
--
Nick.
Posts: 120
Threads: 22
Joined: Dec 2015
2017-09-21, 15:07:07
(This post was last modified: 2017-09-21, 15:23:25 by jwzumwalt.)
(2017-09-21, 15:05:04)hameau Wrote: This isn't really necessary. You can just create a page, make the custom slug 404 and it will override the built-in error page (GS wiki)
You can do the same thing for 410 (Page Gone).
I don't understand your answer - so please provide a simpler example that provides a create new page link from the 404 error.
Thanks,
jwzumwalt
(\__/)
(='.'=)
(")_(")
Posts: 18
Threads: 3
Joined: Aug 2017
(2017-09-21, 15:05:04)hameau Wrote: This isn't really necessary. You can just create a page, make the custom slug 404 and it will override the built-in error page (GS wiki)
You can do the same thing for 410 (Page Gone).
(2017-09-21, 15:07:07)jwzumwalt Wrote: (2017-09-21, 15:05:04)hameau Wrote: This isn't really necessary. You can just create a page, make the custom slug 404 and it will override the built-in error page (GS wiki)
You can do the same thing for 410 (Page Gone).
I don't understand your answer - so please provide a simpler example that provides a create new page link from the 404 error. - Login to admin backend > page management > new page
- expand "options" and set "404" on "slug" input
- Insert your custom title and content
- save
now if you try to access a page that does not exist, your system will redirect you to the newly created page
Posts: 120
Threads: 22
Joined: Dec 2015
2017-09-22, 05:06:41
(This post was last modified: 2017-09-22, 13:00:21 by jwzumwalt.)
Quote:- Login to admin backend > page management > new page
- expand "options" and set "404" on "slug" input
- Insert your custom title and content
- save
now if you try to access a page that does not exist, your system will redirect you to the newly created page
OK, now I see where your headed.
So, rather than detract from the hard work that Dmitry Yakovlev did, why don't you write a better one, include clear instructions and provide it to the community?
Dmitry's solution does not create a new page, nor is that a good idea. His solution supplies a link
that gives the option of creating the new page.
Thanks,
jwzumwalt
(\__/)
(='.'=)
(")_(")
Posts: 6,266
Threads: 181
Joined: Sep 2011
This is default behavior built into gs already, why would you need a plugin?
The instructions are already in the wiki....
Posts: 120
Threads: 22
Joined: Dec 2015
2017-09-22, 11:12:13
(This post was last modified: 2017-09-22, 13:09:02 by jwzumwalt.)
(2017-09-22, 09:24:43)shawn_a Wrote: This is default behavior built into gs already, why would you need a plugin?
The instructions are already in the wiki....
So, before I started this, I did a forum and plugin search for "404", "missing page", "page
missing", "page not found" and there was no satisfactory search returns. I also requested
information about this in a forum comment. It seems no-one knew. How would someone
know it was in the Wiki?
Are you saying the default behavior is to allow an Admin user the option to create a new page???
I don't think so...
I just installed/updated the latest GS on 3 sites and it did not do this? Nor did it provide a
404.xml in the pages directory. It seems to me the problem would be at least half solved if
there was a default 404.xml in the pages directory.
A little information in the header comment would be a big help. But I don't think
(maybe I am wrong) that GS allows PHP code in the XML file? PHP code is necessary in order
to create the new page link. Which brings us back to a plugin?
If I am wrong, then please supply a simple 404.xml with the create new page link (only for admins)
that takes you to a admin page with the page name already filled in. This is the beauty of Dmitry's solution.
Thanks,
jwzumwalt
(\__/)
(='.'=)
(")_(")
Posts: 538
Threads: 12
Joined: May 2013
How about using search engine? When I type "GetSimple 404" in google search engine, I get this link in the first result: http://get-simple.info/wiki/doku.php?id=404
This is the same link that hameau suggested to you in the first reply to this thread. The entire process is described in two lines of text there, how much easier does it need to be?
Posts: 120
Threads: 22
Joined: Dec 2015
2017-09-22, 20:06:18
(This post was last modified: 2017-09-22, 20:15:40 by jwzumwalt.)
(2017-09-22, 16:22:58)Bigin Wrote: How about using search engine? When I type "GetSimple 404" in google search engine, I get this link in the first result: http://get-simple.info/wiki/doku.php?id=404
This is the same link that hameau suggested to you in the first reply to this thread. The entire process is described in two lines of text there, how much easier does it need to be?
So this is what I asked hameau and he got real quite - ".... please provide a simpler example that provides a create new page link from the 404 error" [for an admin user].
Show me a 404.xml that exibits the functionality....
Show me how easy it is?
Ya, it should be less than 6 lines of code, but I don't think you
can do it in an XML file - show me!
Thanks,
jwzumwalt
(\__/)
(='.'=)
(")_(")
Posts: 1,247
Threads: 82
Joined: Feb 2011
(2017-09-21, 14:25:18)jwzumwalt Wrote: Create New Page From 404 "Page Not Found" Error
http://get-simple.info/extend/plugin/cre...rror/1110/
This plugin will add a [ create] page link to a 404 "page not found" error if the user has "admin" privileges.
This GS plugin by Dmitry Yakovlev was made as as favor for me. Dmitry had no intent on making this a supported GS plugin. I have found this plugin so convenient and useful that I created installation instructions and made the universal template so others could use the plugin without modification.
This should work with all past and future versions of GS. However no support or future enhancements should be expected!!!
Included with this package are two screenshots of the plugin in action.
"Screenshot-1.png" is an example of the basic "template-404.php" provided
"Screenshot-2.png" is an example of the "template-404-Summit-Theme.php"
So 2 possibilities:
1. When admin user gets to 404-page, he now can directly create a custom 404 page.
2. When admin user gets to 404-page, he can now directly create a page for the missing page.
Which of the 2 is the correct function of this plugin? I think it is the second, where I think most replies to this topic assume it's the first.
Posts: 3,491
Threads: 106
Joined: Mar 2010
It seems nobody around here has understood what this plugin really does. :-)
It lets site admins create pages like with red links in the Wikipedia.
Posts: 6,266
Threads: 181
Joined: Sep 2011
ohh create new page on 404 like a wiki, that makes more sense. This could also be done with a component, using my component hook plugin, or dynpages and a 404 template
Posts: 120
Threads: 22
Joined: Dec 2015
2017-09-23, 01:51:44
(This post was last modified: 2017-09-23, 02:13:37 by jwzumwalt.)
(2017-09-22, 22:46:44)Carlos Wrote: It seems nobody around here has understood what this plugin really does. :-)
It lets site admins create pages like with red links in the Wikipedia.
Thanks Carlos !
What is happening (I am guilty of this myself from time to time) is these folks quickly skimmed the message without realizing the full scope of the problem. When the first wise cracker (trying to increase their click status) made an assumption it was a simple html page with no logic, it started the snowball rolling.
The solution requires php slug logic and a custom 404.xml is not going to do it.
Thanks for reading the WHOLE message
The plugin does what needs to be done without a customer having to do any custom programming and screwing up their base files if they upgrade in the future.
The plugin description is pretty self explanatory - when a 404 error occurs, it creates a link the admin user can click on and go to an edit page WITH THE MISSING PAGE SLUG NAME already inserted on the form. Now, try and do that on a 404.xml - it's not going to happen.
Thanks,
jwzumwalt
(\__/)
(='.'=)
(")_(")
Posts: 423
Threads: 15
Joined: Mar 2011
(2017-09-23, 01:51:44)jwzumwalt Wrote: When the first wise cracker (trying to increase their click status) made an assumption it was a simple html page with no logic, it started the snowball rolling.
Objection. Well, I'm very sorry I didn't understand what you were asking. There are two sides to communication, you know. At least four other people had the same misunderstanding as I did, so ... who was wrong?
Still, at least I increased my click status, whatever that is.
--
Nick.
|