0
Welcome Guest! Login
0 items Join Now

[closed] How to change 404-page

  • [closed] How to change 404-page

    Posted 8 years 11 months ago
    • I am using Admintools. It has a feature to edit the <meta name="generator" content=Joomla....> to something else. The 404 page generated by the Gantry template is displaying the default text. I would like to change that. How to?
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 22301
    • Thanks: 3229
    • messin' with stuff

    Re: [closed] How to change 404-page

    Posted 8 years 11 months ago
    • error.php in the template root is what's used to generate the 404... but it's just the body content... I'd assume Gantry spits out the normal index.php header
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:
  • Re: [closed] How to change 404-page

    Posted 8 years 11 months ago
    • If that is so. Which file to edit?
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 22301
    • Thanks: 3229
    • messin' with stuff

    Re: [closed] How to change 404-page

    Posted 8 years 11 months ago
    • So I grepped Gantry for that line, or pieces of that line, and I didn't find anything... that <head> level stuff like generator is surely only going to be set by Joomla... so I'm sure Gantry is asking Joomla for that piece of code and when it does so on a 404 response it would seem like AdminTools isn't getting involved... so the only option I see is hacking whatever Joomla file (you'd need to consult their docs or hit their forums) outputs that line and setting it how you please

      I'm curious, can AdminTools change that line using the Protostar or Beez3 templates when a 404 page is returned? When a server 404s it's very different than returning content... Joomla obviously intercepts the output and puts out a nice 404 page but I wonder if AdminTools is every queried, or is allowed to change output content, on a 404 for ANY template...
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:
  • Re: [closed] How to change 404-page

    Posted 8 years 11 months ago
    • It is certainly Gantry4 rendering the code. I did a test with Protostar and there is no meta info in the 404. Another template using Gantry5 also doesn't return any meta info like "generator" in the 404-page. I guess moving to Gantry5 for that matter, is the best.
    • Last Edit: 8 years 11 months ago by Cornelius123. Reason: mistake
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 22301
    • Thanks: 3229
    • messin' with stuff

    Re: [closed] How to change 404-page

    Posted 8 years 11 months ago
    • I still think Gantry has to ask to Joomla for it and at least with G4 Admin Tools isn't intercepting/modifying for whatever reason... I searched the Gantry 4 codebase for a number of different variants on the line of code and I didn't get any hits... it's possible I missed it somehow but I couldn't find anywhere that Gantry was outputting that meta line, in any form.
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:
  • Re: [closed] How to change 404-page

    Posted 8 years 11 months ago
    • I do not understand the difference in Gantry 4 and 5.

      With Gantry 4 normal page looks like this:
        <meta name="generator" content="Larand Internet voor Adviesbureau Charl de Graaf" /> (Generated by Akeeba Admin Tools)
      404 page looks like this:
        <meta name="generator" content="Joomla! - Open Source Content Management" />

      With Gantry 5 normal page looks like
        <meta name="generator" content="larand" /> (Generated by Akeeba Admin Tools) 
      The 404 page has no meta content!
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 22301
    • Thanks: 3229
    • messin' with stuff

    Re: [closed] How to change 404-page

    Posted 8 years 11 months ago
    • technically a 404 page doesn't need a meta generator tag... the only thing it truly needs to satisfy the SEO gods in it's header is a 404 status code... then google likes it when you provide a link back to the home page or other pages...

      to be super technical you're not supposed to put anything in the content field of a meta generator tag that isn't a program/piece of software... perhaps you want to change the meta author tag?

      If you'd like to make a case that G5 should include the meta generator tag in its 404 pages then GitHub would be the best place to post and engage with the developers

      github.com/gantry/gantry5
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:
  • Re: [closed] How to change 404-page

    Posted 8 years 10 months ago
    • Hi Matt, thanks for your replies. I think you misunderstand me. I noticed the difference between gantry 4 and 5 concerning the content of the metatag. I use Akeeba Admin Tools to change the content of the metatag Generator. From "Joomla" to "something else". I don't want hackers to see the site is using Joomla. Now with Gantry 4 template in the 404-page the content of the metatag Generator turns to "Joomla ...." I wanted to change this behaviour. I looked at the 404-page of a gantry 5 template and noticed that there is no metatag at all. So I guessed Gantry is the cause. Now maybe that is not correct. Anyway I will only use Gantry 5 in the future. So the problem isn't that big.
      Thanks again.
      Greetings, Chris
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 22301
    • Thanks: 3229
    • messin' with stuff

    Re: [closed] How to change 404-page

    Posted 8 years 10 months ago
    • Gantry is definitely rendering the 404 page... but it's not solely responsible... it requests a lot of content/structure/coding from Joomla, 3rd party extensions, and your server.

      I could not see where Gantry 5 was ever setting a meta generator tag... but it may simply not be asking for it either in G5 (on a 404 page specifically) whereas in G4 perhaps Gantry just asked Joomla for the same generic <head> content that every-other page got.

      There's also about 200 other ways hackers, or anyone savvy, can tell you're running Joomla.

      I don't know enough about the generator tag and it's use but I don't think I can call this a bug per se. If you do want to advocate for its inclusion in G5 404 pages then GitHub is definitely the right spot... much smarter folk than me there :)
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:

Time to create page: 0.086 seconds