Keyword

The url is longer than it should be

More
10 years 1 month ago #131094 by Fahad

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 1 month ago #131095 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: The url is longer than it should be
You should disable Joomla! 's default canonical links because they are wrong.
They are meant for com_content and they fail to work properly in K2.

www.robertwent.com/blog/joomla/87-how-to-remove-joomla-s-canonical-tag-without-hacking-the-core

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #131096 by Fahad
Replied by Fahad on topic Re: The url is longer than it should be
Thank you. I tried opening the template index.php file, but did not find the word ''canonical'', can you please help me step by step?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 1 month ago #131097 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: The url is longer than it should be
You need to place this snippet in your index.php file, preferably in the top.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #131098 by Fahad
Replied by Fahad on topic Re: The url is longer than it should be
That just messed up the site.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 1 month ago #131099 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: The url is longer than it should be
What was the result? A white page?
Make sure that $doc is not declared elsewhere.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #131100 by Fahad
Replied by Fahad on topic Re: The url is longer than it should be
The result was some text at the top of the site and fonts being meesed up.

Is it possible for you to have a look at the issue if I send you login details on PM?

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #131101 by Lefteris
Replied by Lefteris on topic Re: The url is longer than it should be
@Fahad

You cannot send PM. Try to revert your changes. Then ensure that you are using the latest version of both K2 ( 2.6.8 ) and Joomla! (3.3.3).

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #131102 by Fahad
Replied by Fahad on topic Re: The url is longer than it should be
Hi. I have updated the k2 and joomla to the latest versions you mentioned and tried the same thing again. I am getting the same results.

This is how the index.php file looks after the changes:

$doc = JFactory::getDocument();
foreach ( $doc->_links as $k => $array ) {
if ( $array == 'canonical' ) {
unset($doc->_links[$k]);
}
}
<?php

/**
*
* Main file
*
* @version 1.0.0
* @package Gavern Framework
* @copyright Copyright (C) 2010 - 2011 GavickPro. All rights reserved.
*
*/

// No direct access.
defined('_JEXEC') or die;
if(!defined('DS')){
define('DS',DIRECTORY_SEPARATOR);
}
// Add JavaScript Frameworks
JHtml::_('bootstrap.framework');

// enable showing errors in PHP
//ini_set('error_reporting', E_ALL);
//ini_set('display_errors','On');

// include framework classes and files
require_once('lib/framework/gk.const.php');
require_once('lib/framework/gk.parser.php');
require_once('lib/gk.framework.php');
// run the framework
$tpl = new GKTemplate($this, $GK_TEMPLATE_MODULE_STYLES);

/* End of the file - index.php */



This is the text on the top of my site:

$doc = JFactory::getDocument(); foreach ( $doc->_links as $k => $array ) { if ( $array == 'canonical' ) { unset($doc->_links[$k]); } }


The problem is still here. I am now changing back to the original index.php file untill I hear from you again on how to solve it. Thanx

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #131103 by JoomlaWorks
Replied by JoomlaWorks on topic Re: The url is longer than it should be
Apply Robert Went's fix in your template's index.php file (and within the <?php & ?> tags). If that doesn't work for you, it's because your template is perhaps doing its own processing to the output of Joomla. In that case talk with Gavick support on how you can apply Went's fix for the canonical meta tag.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum