• Home
  • Get help
  • Ask a question
Last post 2 hours 13 min ago
Posts last week 94
Average response time last week 34 min
All time posts 67875
All time tickets 10492
All time avg. posts per day 20

Helpdesk is open from Monday through Friday CET

Please create an (free) account to post any question in the support area.
Please check the development versions area. Look at the changelog, maybe your specific problem has been resolved already!
All tickets are private and they cannot be viewed by anyone. We have made public only a few tickets that we found helpful, after removing private information from them.

#1482 – New page (Category Blog) results in "page not found"

Posted in ‘sh404SEF’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Thursday, 03 December 2015 06:14 UTC
johnmo
Hi there,
We've had sh404SET installed for 3 months or so now.
I have just created a new menu item "Partners" in a hidden menu (category blog type). It is linked to a sub-category "Trophy Sponsors" which is a child of "Partners" category.

Menu item alias is "partners". When I go to domainname.com/partners I get "BAD KARMA: WE CAN'T FIND THAT PAGE!". The component suggests to try domainname.com/partners/trophy-sponsor/ but when you go there you get the following error:

Notice: Trying to get property of non-object in /home/winehawk/public_html/templates/g5_hydrogen/html/mod_custom/default.php on line 23

Fatal error: Call to a member function get() on a non-object in /home/winehawk/public_html/templates/g5_hydrogen/html/mod_custom/default.php on line 23

I'd like to display articles from a category just like default joomla set up would.
Everything works fine when I disable sh404SEF :-/

Joomla! 3.4.5
sh404SEF 4.7.1.3144
Gantry 5 5.2.4
Hydrogen Theme

Settings for Content:
(use default handler) -> Use sh404sef plugin if available -> Enable shURL

What could be the problem and how to solve it?

Thanks,

Ella
Thursday, 03 December 2015 06:26 UTC
johnmo
Update: I have just assigned Beez5 template to the Partners menu item and it is still not working :-/
Thursday, 03 December 2015 13:46 UTC
wb_weeblr
Hi

I have just created a new menu item "Partners" in a hidden menu (category blog type). It is linked to a sub-category "Trophy Sponsors" which is a child of "Partners" category.
Menu items are not used to build URLs. At all.

Menu item alias is "partners". When I go to domainname.com/partners I get "BAD KARMA: WE CAN'T FIND THAT PAGE!". The component suggests to try domainname.com/partners/trophy-sponsor/
"partners" is not the URl of that content. As suggested by the 404 error handler, the current URL seems to be /partners/trophy-sponsor/

You can change the way URLs are built using the parameters under "Extensions" > "Joomla" on sh404SEF configuration.
You will need to "Purge" URLs after changing such settings, so that new URLs are created.

when you go there you get the following error:



Notice: Trying to get property of non-object in /home/winehawk/public_html/templates/g5_hydrogen/html/mod_custom/default.php on line 23



Fatal error: Call to a member function get() on a non-object in /home/winehawk/public_html/templates/g5_hydrogen/html/mod_custom/default.php on line 23
That's a custom module handler added by your template, to replace the standard Joomla module handler, so I can't say why it's dying. I would think it may reads directly something that doesn't exist when sh404SEF is enabled for instance.
Can you tell us what's the code at and around that line 23 in that file. We may be able to provide a fix, even if this is a problem in your template.
Everything works fine when I disable sh404SEF :-/
Which doesn't mean that sh404SEF is having a problem ;)

I have just assigned Beez5 template to the Partners menu item and it is still not working :-/
This is as expected and exactly what sh404SEF is supposed to do.

Rgds
 
Thursday, 03 December 2015 14:41 UTC
johnmo
I'm afraid purging will break some other urls on the website... I guess I could just modify the SEF url.

Line 23 reads:
$menuname = $active->params->get('page_heading');

The whole file:
<?php
/**
 * @package     Joomla.Site
 * @subpackage  mod_custom
 *
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;
?>


<div class="custom<?php echo $moduleclass_sfx ?>" <?php if ($params->get('backgroundimage')) : ?> style="background-image:url(<?php echo $params->get('backgroundimage');?>)"<?php endif;?> >
	<?php echo $module->content;?>

	<?php 
	if($moduleclass_sfx=='banner')
	{ 

		$menu = JFactory::getApplication()->getMenu();
		$active = $menu->getActive();
		$menuname = $active->params->get('page_heading');
		if($menuname)
		{
		?>

			<div class="layout-slideshow">
			<div data-slideshow-content="" class="sprocket-features-content">
				<h2 class="sprocket-features-title">
			<?php echo $menuname; ?>

			</h2>
			</div>
			</div>	
		
	<?php	
		} 
	} 
	?>
</div>

Thanks,
Ella
Thursday, 03 December 2015 14:45 UTC
wb_weeblr
Hi

I'm afraid purging will break some other urls on the website... I guess I could just modify the SEF url.
As per the documentation, Purging only deletes automatically generated URLs. You won't break other URLs, aside from the fact that a few 404s can be generated if some pages are visited before they are regenerated.

Could you please provide us with superadmin credentials to your website. You can create a temporary account, and delete it afterwards, but it must have superuser level.

I believe there's something wrong in the basic way sh404SEF is used here. The error message can be the sign of a bug in the 404 handler, but I don't know why.

Thanks and regards
 
Thursday, 03 December 2015 14:47 UTC
wb_weeblr
One thing:

Can you check if you have selected an Itemid to display the Error page? under the "Error page" tab of sh404SEF configuration, in the per-language error page content tabs.

Rgds
 
Thursday, 03 December 2015 15:11 UTC
johnmo
Sorry, by "breaking" I meant "changing" which means some of the existing urls might result in 404 error if accessed.

Access details:
http://xxxx.co.nz/administrator
xxxx

Itemid was set to "None". I have selected the Home page, cleared cache but nothing has changed.

Ella
Thursday, 03 December 2015 15:49 UTC
wb_weeblr
Hi

OK, first question: if the "Partners" link is a hidden menu, how will it be displayed on the site?
A URL can only be added to the database after it's been displayed. Before that, any attempt will be a 404.

Second: I fixed the error on "/partners/trophy-sponsor/" by making sure the URL had a an Itemid:

This screen you get by clicking on the "Duplicates" counter on the "partners/trophy-sponsor/" in the URL manager (it currently shows "1" duplicate).

Before, the non-sef URL #2 was selected, it has no Itemid, and this is probably why the module triggered an error (though it shouldn't).

By selecting the currently marked #1 URL as the current non-sef, an Itemid is provided and selected, and the error doesn't appear any longer.

That said I don't see why the module throws that error at all.

Rgds
 
Thursday, 03 December 2015 19:36 UTC
johnmo
Thank you for fixing it.

1.
It should display just like it would on the default Joomla setup without the sh404SEF component.
Usually you can create a menu item in a hidden menu and access it just through the url - you don't need to display it anywhere on the front end. Often you don't want to display it to the average user but only to those who know the url. If sh404SEF cannot behave this way, then it's a big fault of the component.

2.
So, how did you add the itemID to the URL? Did you create a new SEF URL? Or was it already there and you've just selected it to be associated with partners/trophy-sponsor url by clicking on the star?
and why does sh404SEF not do it automatically???

Ella
Friday, 04 December 2015 09:11 UTC
wb_weeblr
Hi

1 -
It should display just like it would on the default Joomla setup without the sh404SEF component.
Nope, that's not how sh404SEF or any SEF extension work.

URLs are picked up by Joomla when a page is being built for display. All links on the page are then passed on to sh404SEF for transformation and storage in the database.

If a link is not displayed on a page, it won't be put in the database, and a 404 will be triggered when you try to access it.

Joomla directly decodes URLs, even if they have not been displayed but this has 2 drawbacks:

- you don't have a list of pages on your site, so you can't modify them, attach meta data, OGP, etc
- it "decodes" them too much, always trying to display something. For instance /42-my-article will show you a page, but /42-my-art will also, and just /42 will also show you the same page, and so instead of having the 404 you should have for those bad URLs, you end up with duplicate content.

2 - As per #1 above, sh404SEF never create any URL. Joomla creates those URLs, the non-sef ones. We just record them as Joomla passes them on to us for transformation into SEF URLs.
This is one the things Joomla (and you ) can do: sometimes URLs have an Itemid, sometimes they don't, sometimes they will have many.
One of the SEO roles of sh404SEF is to make sure that the same SEF URL is presented to the world (including search engines),regardless of whatever Joomla came up with in terms of Itemid.
It can have side effects, but from an SEO standpoint, that's the way to go.
Or was it already there and you've just selected it to be associated with partners/trophy-sponsor url by clicking on the star?
It was already there, because somewhere on your site, there's a link to that page. Actually, there are at least 2: one with the Itemid and one without.

Rgds
 
Saturday, 05 December 2015 01:21 UTC
johnmo
Thank you very much for your detailed explanation. It all makes sense now :-)
Monday, 07 December 2015 14:21 UTC
wb_weeblr
Hi

Glad it's all clear now, it can get really complex sometimes.

Closing this ticket now, feel free to open a new one as needed. If you do so, please mention this ticket number in the new one.

If you created any superadmin account for us, be sure to delete or block it now to avoid unnecessary risk in the future.

Rgds
 
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.