New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error message regarding head.php #3155
Comments
Sounds more like a faulty component or plugin. I'll answer on the forum to narrow this down. |
When messages like this come up dealing with JDocument classes and undefined methods, my first thought is there is a plugin that is not checking the environment before calling methods. |
I've found this coming out of gantry in the past. would you be using that for your template framework by any chance? |
Yes, I am. Do you know what generates it? I'll happily pass it on to Rockettheme. |
No - it's just my personal site so I haven't really bothered to investigate - I'll do some research. Make sure your up to date though - because I don't remember seeing it in the last month or two. I'll do some research though |
Everything is up to date. Thanks for researching. |
Hmm well I can't find anything instances except in the Joomla core libraries anywhere on my site - so it must have vanished in an update at some point. See if you can search for any non-core instances of it somewhere |
Sorry, I have no idea how to do that - I'm not a programmer or developer |
OK change of plan do you have K2 installed by any chance? |
No - Seblod |
in what case you got this error? if you use Seblod, then whether error still present if you do same without Seblod installed? |
OK so I think the issue is if you try and create a feed where one doesn't exist. For example on K2 if i append &format=feed&type=rss to a single article item (note view.feed.php doesn't exist for the item view in k2) then I get that error Does joomla default back to view.html.php if the view.feed.php doesn't exist? If so perhaps we need to add those checks Michael suggested into the JDocumentFeed |
It should not, it should show an 500 error page that the view wasn't found. |
I'd test by disabling all non-core plugins, especially system and content ones and see if the error goes away. And then enable one after eachother again and see when the error starts again. |
OK - I'll have to wait, as this is a live site and I can't turn stuff off On 23 February 2014 20:16, Thomas Hunziker notifications@github.com wrote:
|
I've just disabled ALL plugins on my site (except the Joomla user and authentication and user plugin) and still get the error. BUT if i swap my template back from Gantry to default joomla then the error goes away. So I'm going back to it being a gantry problem. Although I have bugger all clue why as gantry doesn't directly call the function |
OK based on it being a gantry problem - see my previous edit (swap back to a default joomla/non-gantry template and you get the expected 500 error) I'd go to rockettheme and try and figure out the problem there. I'm happy to explain further to them if needed :) |
I would not start adding methods dealing with the HTML document to our other document classes. Any place calling |
OK so there is NO explicit $doc->isHtml5() calls being made. It's being called in the JRendererHead only in my install. Which is why I'm so damn confused as to how this is being called. I guess it must be deep in the gantry library |
I'm going to close this issue since it's obviously not an error in core but wrong usage somewhere in Gantry. |
Maybe. I dunno whether we can add some additional checks in JDocument though to try and stop these kinds of fatal errors |
How would you check if some code will call a non-existant method? |
Hello this is not a Joomla bug, the problem is that some extensions will ask the error page to be created while format is not HTML, by throwing an exception, i am not sure if this appropriate behaviour, but the error.php of some templates is not checking the current format, to see how your template is (or not) handling this case, just test this:
to fix this, and at the same time you have 2 options either exit and output nothing or print some short message like (add at the top of your template's error.php): (--ADD the code after the check if $this->error isset) $_format = JFactory::getApplication()->input->get('format', 'html');
if ($_format!='html') { // catch ALL non html formats, or maybe output special e.g. if xml output XML ??
die(
'Exception with ERROR code:'.$this->error->getCode()
.' Thrown by --"'.$_format.'"-- format URL: '. JURI::current()
.' Error: '.$this->error->getMessage()
);
} |
Does anyone know why |
I assume that joomla.org is running on the latest version of Joomla, so it seems safe to say that there is an issue in the Joomla core with error handling and display of 404 pages. |
Probably "Document type not found" or something like that. SEF Suffixes are a bit special because they don't relate to a page but toi a document type. Since there is no file for that, it will fail loading the respective view file (view.htmll.php in this case) . |
Same suffix produces a normal Joomla error page on the developer site, so my initial hunch is there's something with the server configuration for Rochen's MCS setup versus their MVS offerings. |
Sorry to bug you, but are there any news on this? We're trying to debug an issue in Gantry 4, but as long as there are issues not related to Gantry (like on joomla.org) , it would be helpful to have those figured out first. |
No news because it's very likely a server issue. It's not related to core and this issue is closed. |
Well, I just tested on the staging site for .org and got this message back: Fatal error: Call to undefined method JDocumentRaw::addHeadLink() in modules/mod_search/mod_search.php on line 23 So once again some of the bad architecture in JDocument is screwing things up. It's not an issue with Joomla's error handling, it's just how bad JDocument sucks. |
I'm actually a bit surprised the module is even loaded when JDocumentRaw is active. Is that module active in the error page? |
https://github.com/joomla/joomla-cms/blob/staging/templates/protostar/error.php#L127 On 9 December 2015 at 19:30, Thomas Hunziker notifications@github.com
Brian Teeman |
The |
Personally I think the error page should be checking the document type first before trying to load modules. Would that work? |
@Bakual In |
Nope. There's a |
Ah. So then the module needs to check itself if it's in HTML mode. On my servers, a |
Appears to be a gantry issue. Here is a current backtrace I pulled off a recently port-in of a May 5 10:34:12 server httpd: PHP Fatal error: Call to undefined method JDocume
|
I got it to "work" in the sense of getting rid of the FATAL error by making these changes. < if ($document->isHtml5())
|
Hi - found this error occuring in many sites: "Call to undefined method JDocumentFeed::isHtml5() in /home/mysite/public_html/libraries/joomla/document/html/renderer/head.php on line 73"
Did a search on Google using : "Fatal Error""Call to undefined method JDocumentFeed::isHtml5()"
and found dozens of sites. I also noticed it coming up in the Joomla forum at http://forum.joomla.org/viewtopic.php?f=706&t=835053
The text was updated successfully, but these errors were encountered: