SEF generates different urls

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
StarShaper
Joomla! Explorer
Joomla! Explorer
Posts: 347
Joined: Wed Sep 27, 2006 11:55 pm

SEF generates different urls

Post by StarShaper » Fri Dec 07, 2007 2:30 pm

Hi,

I've noticed that the urls are not consistent. Articles have for example the url

Code: Select all

http://www.domain.com/articles/politics/4-clinton.html
and

Code: Select all

http://www.domain.com/articles/politics/6-politics/4-clinton.html
Both urls are working. But it's pretty annoying to have 2 different urls for the same article. Is there are reason for this? ???

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19068
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: SEF generates different urls

Post by infograf768 » Fri Dec 07, 2007 4:56 pm

It s related to the way you reach the article, i.e. the menu concerned.
This is a legacy from the old Mambo.
It is unlikely to be solved in 1.5 final release.
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

mikemills
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Sep 13, 2007 6:07 pm

Re: SEF generates different urls

Post by mikemills » Fri Dec 07, 2007 7:52 pm

This is a fundamental problem, isn't it?  [And by fundamental, I mean that it is probably fundamental to the way menus are implemented.]

I.e.:

1. Articles have their own URL (e.g., article title linkable set to 'yes').
2. Menu items that link to articles have their own URL, which also points to the article.

Hmm...if anyone has the time, I'd be curious to know more about how this works, as it would be an interesting subject to look into, code-wise.

Have articles always had their own URLs (linkable titles), or is this a new feature of 1.5?

It seems that it would be best if a menu item could just 'be a link', rather than a separate object with it's own URL.

Wait a second..."External Link" does exactly that.  Testing it now...yes, it works.

It seems that a possible workaround is to just use external links for your menu items, which link directly to the article URL.

Or might this mess something else up..?

--
Mike Mills

StarShaper
Joomla! Explorer
Joomla! Explorer
Posts: 347
Joined: Wed Sep 27, 2006 11:55 pm

Re: SEF generates different urls

Post by StarShaper » Fri Dec 07, 2007 9:57 pm

infograf768 wrote: It s related to the way you reach the article, i.e. the menu concerned.
This is a legacy from the old Mambo.
It is unlikely to be solved in 1.5 final release.
Thx for response! This should be a primary issue. Inconsistent urls are bad, since search engines have to deal with different addresses.

User avatar
yvolk
Joomla! Guru
Joomla! Guru
Posts: 979
Joined: Thu Jun 01, 2006 1:52 pm
Location: Moscow, Russia
Contact:

Re: SEF generates different urls

Post by yvolk » Sat Dec 08, 2007 8:30 pm

StarShaper wrote:
infograf768 wrote: It s related to the way you reach the article, i.e. the menu concerned.
This is a legacy from the old Mambo.
It is unlikely to be solved in 1.5 final release.
Thx for response! This should be a primary issue. Inconsistent urls are bad, since search engines have to deal with different addresses.
I don't think, that this is so definite.
It is legal to link to the same Article (menu item type=Article Layout) from two different menu items. Each menu item may define different page layout, depending on the semantics of this menu item context.
In addition to it, We may have a blog (e.g. Section Blog View), containing the same Article, and it would be very good, if when User clicks to the "Read more..." link from this Blog, the "Blog context" remains preserved (this means, that URL of the same article should have some "memory" of the blog context, from which we came...).
- This is about Architecture of Joomla...

What's about technical implementation of "The same link to the Article" - this is very easy: Joomla! has to use the same function across whole code to generate links to the Articles (see e.g. this message about such function, implemented in yvBBCode extension and below).
Text of all my messages is available under the terms of the GNU Free Documentation License: http://www.gnu.org/copyleft/fdl.html

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19068
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: SEF generates different urls

Post by infograf768 » Sun Dec 09, 2007 6:34 am

Do you think it can be implemeneted in 1.5 without a major overhaul?
If yes, I will move this to Q&T or, better, you could add it to the Tracker.
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
yvolk
Joomla! Guru
Joomla! Guru
Posts: 979
Joined: Thu Jun 01, 2006 1:52 pm
Location: Moscow, Russia
Contact:

Re: SEF generates different urls

Post by yvolk » Sun Dec 09, 2007 7:29 am

infograf768 wrote: Do you think it can be implemented in 1.5 without a major overhaul?
If yes, I will move this to Q&T or, better, you could add it to the Tracker.
No, I think, that "different urls" are "not a bug"  :) and it's not a "legacy burden" - this is an Architecture of Joomla! (this is "what Joomla! is"), that should be discussed (I only don't know where and with whom  ???), defined (documented !!!) and only after that implemented ("fixed") in code.
Text of all my messages is available under the terms of the GNU Free Documentation License: http://www.gnu.org/copyleft/fdl.html

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19068
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: SEF generates different urls

Post by infograf768 » Sun Dec 09, 2007 7:43 am

OK, definitely not for 1.5  ;)
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

mikemills
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Sep 13, 2007 6:07 pm

Re: SEF generates different urls

Post by mikemills » Mon Dec 10, 2007 8:29 pm

Hmm, it may not be a "bug", but it is something that needs to be "fixed" - since duplicate content can adversely affect your pagerank...(although I don't think it _should_...maybe Google could be petitioned to ignore duplicate content for Joomla! sites?  ;)

However, I understand that it may be too much to ask for 1.5.
I'm wondering what the solution might be, though.  Looking at my "FAQs" page, as an example, I see that:

http://www.mikemillsconsulting.com/faqs is a menu item URL that points to my "Frequently Asked Questions" category.

http://www.mikemillsconsulting.com/faqs ... -questions is the URL for my category, but it is incorrectly pointing to "Newsflash 4".  They both have an ID of 42 - this looks like a SEF bug, by the way.

http://www.mikemillsconsulting.com/faqs ... ocess  is the URL for a particular FAQ entry on my site.

http://www.mikemillsconsulting.com/faqs ... ocess  is the direct Article URL for that same FAQ entry (duplicate content).

It seems to me that there are at least two "problems":

1) That menu items have their own URL, instead of just using the URL of the item in question.  (That's why I suggested using the "External Link" option above.)
2) That both menu items and categories are included in the URLs of articles.  Articles are unique, by way of their itemID (the bug noticed above notwithstanding), and it seems to me that URLs should just point to the article, and not even mention the menu and category in the path.  When you consider a future where an article could be in multiple categories, then I think that makes even more sense.

Basically, I think "how to find an article" (menu and category) should be taken out of the Article URL.  An article URL should, I think, be permanent and probably not categorized (except maybe including the year and month it was published).

Hmm, on the other hand, I suppose one could make an argument that the search engines have it wrong, and should allow "duplicate" content as a way of supporting "taxonomy friendly URLs".  For example:

http://foo.com/news/science/sun_explodes.html
and also
http://foo.com/news/topnews/sun_explodes.html

Otherwise, without "taxonomy friendly URLs", you might browse to "http://foo.com/news/topnews", and then select the "sun explodes" article with a permanent article URL like:

http://foo.com/2007/12/sun_explodes.html

Hmm...thinking out loud, sorry :)  What if, by convention, every article were to have a permanent URL (like http://foo.com/2007/12/sun_explodes.html).  A meta tag could indicate that this is the permanent URL to search engines, and that it's "basename" is "/2007/12/sun_explodes.html".  Then, what if - also by convention - search engines would look at the "basename" of URLs, and if two articles have the same "basename", then do NOT treat them as duplicate content.  In other words, this would allow you to include whatever taxonomy you want (including formatting tags, like blog, etc.) in front of the basename URL, and it would be OK with search engines.  In my example, the "basename" would be "/2007/12/sun_explodes.html".  So, "http://foo.com/science/2007/12/sun_explodes.html" would be okay and not treated as duplicate content - it has the same basename as the article's permanent URL.

Going further, this could enable searching for an article using just the URL:

http://foo.com/news/science/  - a hierarchical search URL

http://foo.com/science,sun/    - an "AND" search url, returning articles tagged with both science and sun.

Anyway, sorry for babbling and thinking out loud...it's just something that caught my interest.

--Mike

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: SEF generates different urls

Post by AmyStephen » Mon Dec 10, 2007 8:41 pm

I think (and hope!) that this is a bug. I reported something similar awhile back. There have been a lot of SEF URL bug fixes this weekend.

For those of you who can reproduce the problem consistently, please verify if it still occurs with the nightly download. If it does, I think the devs will want to look at it.

This is system generated duplicate content and it was gone before RC3. Hopefully, we will not have this anymore when we use SEF URLs. (It does still exist with the base URLs, and that's okay with me. If you want no system generated duplicate content, you can use SEF URLs. Seems reasonable.)

Amy :)

User avatar
yvolk
Joomla! Guru
Joomla! Guru
Posts: 979
Joined: Thu Jun 01, 2006 1:52 pm
Location: Moscow, Russia
Contact:

Re: SEF generates different urls

Post by yvolk » Tue Dec 11, 2007 2:37 am

AmyStephen wrote: I think (and hope!) that this is a bug. I reported something similar awhile back. There have been a lot of SEF URL bug fixes this weekend.
Hi, Amy! To decide, what's bug, and what's a feature, we should return to the question "What Joomla! is?". And Joomla!'s problem is in absence of defined and documented "architectural decisions" for such fundamental questions like "What is a page in Joomla!"... No one replied to my message on this subject  :(

As to "what is page in Joomla!", I (and you :)) remember one essay on this subject, "Anna's Joomla Tips", that says:
Pages. Are you sitting down? Because I’m about to lay one on ya. Ready? Web pages don’t exist. At least not in Joomla. When you think you’re looking at a web page, Joomla thinks you’re looking at a menu item. In fact, there’s no way in Joomla to see what is on a particular page, where the positions are, what modules are in what positions, what content shows, etc. Because Joomla doesn’t believe in pages! Frankly, I think it’s silly – the page is the fundamental unit of the web. But re-orient your brain, because Joomla is plugging its ears and singing “la la la la.”
So you may see, that what one may think is the "Link to the article" from the menu item (e.g. "Link to the web page of the article, that should have the same URL...") is in fact, a link to the page, defined by THIS menu item. Yes, this page has an article as part of it, but not "Article only", so it has its own URL...
Text of all my messages is available under the terms of the GNU Free Documentation License: http://www.gnu.org/copyleft/fdl.html

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: SEF generates different urls

Post by AmyStephen » Tue Dec 11, 2007 4:09 am

Yuri -

I do read what you have to say. I understand the point Anna's tips is making. She is saying that the article in Joomla! is not a webpage, and that is true.

But, there is a webpage in Joomla!. The webpage is driven by the menu item. Each menu item generates an ItemID. The ItemID is a large part of the key that builds the Joomla! webpage. It dictates the component, parameters, modules, template, breadcrumbs and current menu item values. Combined, those extensions make the Joomla! webpage - all because of the menu item selected.

There are two sources of duplicate content in Joomla!:

1. User Generated Duplicate Content

This can be avoided if people learn to use Joomla! properly.

Mike has it right when he said this:
mikemills wrote: It seems that a possible workaround is to just use external links for your menu items, which link directly to the article URL.
That's "the secret," if you will.

If you create more than one menu item (excluding external links) that each lead to the same article, then, you have created User Generated Duplicate Content. Google will find the article on more than one page (menu item-item id) on your website.

Don't do that. Do what Mike is saying, instead.

2. System Generated Duplicate Content

There is nothing that learning can do to help us avoid System Generated Duplicate Content. The Frontpage Read more ItemID = 1 issue with 1.0.12 is perhaps the most famous example of system generated duplicate content. There's been a number of issues dating well into Mambo days where the developers have successfully (and unsuccessfully) wrestled with the ItemID and system generated duplicate content.

3. Joomla! v 1.5 SEF URLS

As far as I have been able to tell, SEF URLs in Joomla! v 1.5 have killed all System Generated Duplicate Content except for this problem. The Frontpage Read More, Search Results, Modules of all kinds (Popular and latest news, etc.) all use an existing URL. IMO, this is one of the biggest accomplishments of this release.

4. This problem

This problem is the *only* example I can find of Joomla! v 1.5 creating System Generated Duplicate Content.

You can see it on a default install, using the sample data:
  • Edit the Main Menu - The News menu item, and set Title Links = On.
  • On the home page, click The News in the Main Menu.
  • Hover your mouse over the We are Volunteers article Title and Read More links. It is: http://localhost/the-news/1-latest-news ... teers.html
  • Click the link and then examine the URL in the address bar. It's the same value as the URL above. (So far, so good!)
  • Next, click the title of the article, itself, and examine the URL in the address bar. You will find it changed. It drops the 1-latest-news portion, and becomes:
    http://localhost/the-news/6-we-are-volunteers.html
IMO, that is System Generated Duplicate Content and it's a bug. That *is* the same page in Joomla!. It is driven by the same menu item. It should have the same URL.

They will fix it. After watching Louis Landry breathe life back into PHP 4.3.x this weekend, I would be very surprised if this problem remains.

Yuri - you hang around. We are going to need you.
Amy :)

mikemills
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Sep 13, 2007 6:07 pm

Re: SEF generates different urls

Post by mikemills » Tue Dec 11, 2007 8:27 pm

AmyStephen wrote: IMO, that is System Generated Duplicate Content and it's a bug. That *is* the same page in Joomla!. It is driven by the same menu item. It should have the same URL.
Nice summary, Amy.  It helped me realize that your item #4 ought to be a fairly easy bug to fix.

Basically, when Joomla! is generating the page for (i.e.) http://localhost/the-news/1-latest-news ... teers.html: When it creates the title link to the article URL, it appears that it should simply just use use the same URL as the current page - JURI::current().

As a quick hack, I modified "components/com_content/views/article/tmpl/default.php".  Search for the string "link_titles".
I then changed:

article->readmore_link; ?>

to this:



...and voila, article titles now link to the same URL (i.e., news/latest-news/...)

Of course, this is just a hack - I don't know if there are any side-effects, or if the "readmore_link" variable itself should instead be fixed further up in the code.  (And it looks like the readmore_link variable is being used for more than just the "read more..." link, and ought to be renamed, btw...)

But, I think it illustrates that the problem is easy to fix...

--Mike
Last edited by mikemills on Tue Dec 11, 2007 8:30 pm, edited 1 time in total.

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: SEF generates different urls

Post by AmyStephen » Tue Dec 11, 2007 9:40 pm

SVN 9611
It's fixed! Thanks Louis Landry!  :-*

There goes the last of Joomla! v 1.5 System Generated Duplicate Content. From this point forward, it's up to us!

Amy :)

User avatar
yvolk
Joomla! Guru
Joomla! Guru
Posts: 979
Joined: Thu Jun 01, 2006 1:52 pm
Location: Moscow, Russia
Contact:

Permalink extension for Joomla! 1.5

Post by yvolk » Wed Dec 12, 2007 8:07 am

I reread this thread and see, that we talked about at least two things:
1. Links to same "Web page" MUST have the same URL. We need this e.g. for Google wouldn't find the same article on more than one page, or on more Web pages (driven by Menu Items), than we explicitly created ("User Generated Duplicate Content").
2. Sometimes we need exactly one URL of the Article, that may be used as permanent link (permalink) to this article.
A permalink is a URL that points to a specific blogging entry even after the entry has passed from the front page into the blog archives. (Wikipedia)
Please note, that Joomla! SEF is not suitable (and is not intended) to be used for the second purpose. Of cause, something like:
http://www.mikemillsconsulting.com/faqs ... he-process
- is bad candidate for permalink, and:
http://foo.com/2007/12/sun_explodes.html
- is better, but also not perfect  ;) (it has file extension). As Tim Berners-Lee teaches us, good permalink looks something like this:
http://www.w3.org/1998/12/01/chairs

If we really need permalinks to the Articles, we have to create special Joomla! 1.5 "Permalink" extension for this purpose, that would have these features:
1. It can construct permalink to the Article by its ID. This "ArticleID2Permalink" function should be available to other extensions...
2. It can work as "content plugin" and insert "Permalink to this Article" hyperlink in the text of articles, shown by Joomla! (just like Comments extension inserts comments below text of Article).
3. It intercepts that permalinks to show article, acting as component (or, maybe, "helping" com_content to decode permalink and show desired Article...). This custom permalink decoder (combined with ArticleID2Permalink encoder), if it would be intelligent enough, may allow to design your favourite "custom permalink format", e.g. something like:
http://foo.com/permalink/2007/12/12/325 (where 325 is actual Article ID)
or (not so "permanent"):
http://foo.com/permalink/2007/12/12/sun_explodes (if you are sure you won't ever change alias of the article...)

So, who wants to try to create it?
Text of all my messages is available under the terms of the GNU Free Documentation License: http://www.gnu.org/copyleft/fdl.html

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: SEF generates different urls

Post by AmyStephen » Wed Dec 12, 2007 3:47 pm

Those of you who had this problem, please download the nightly and verify the fix.

+++++

Yuri -

This bug is fixed - there were two URLs generated for the same page and that should never happen in Joomla!. Thanks to Louis Landry, as of SVN 9611, Joomla! doesn't do that anymore.

Joomla! v 1.5 has permalinks, just as Berners-Lee instructs.

If one wants to implement an article as a "page" in Joomla!, the architecture allows it. It's not even difficult. We've talked about it in this thread.

Pretty URLs are coming. Specially formatted URLs are coming. When Joomla!'s router stabilizes (and it is) system plugins will emerge allowing the type of URL you are calling for.

It's not ignorance that slows us down, it's time and resources. It's backwards compatibility. This is a big train moving.

Regarding your last question, I hope you do! Go for it!  8) That's the beauty of the GPL and this architecture.

Amy :)

User avatar
yvolk
Joomla! Guru
Joomla! Guru
Posts: 979
Joined: Thu Jun 01, 2006 1:52 pm
Location: Moscow, Russia
Contact:

Joomla! doesn't have (good) permalinks

Post by yvolk » Thu Dec 13, 2007 7:04 am

AmyStephen wrote: Joomla! v 1.5 has permalinks, just as Berners-Lee instructs.
Sorry, Amy, Joomla! doesn't have permalinks.

Added: Joomla does have bad permalinks only (they are "permanent" only in a restricted sense...).
Even for such "bad permalink" Joomla! core doesn't have API to generate it: I had to implement it myself for my extension, see Linking to content items - implemented in yvBBCodes.
I'm not talking about the term "permalink", but about good, really permanent link...

Please reread my message and Tim Berners-Lee's article.
If you are still sure, that "Joomla! v 1.5 has permalinks, just as Berners-Lee instructs", please give us examples of these permalinks (generated by Joomla!). Examples of what are not (good) permalinks and why see above...
AmyStephen wrote: Regarding your last question, I hope you do! Go for it!  8) That's the beauty of the GPL and this architecture.
So, there are no permalinks in Joomla! and you agree, that they should be implemented ;)
Last edited by yvolk on Thu Dec 13, 2007 11:32 am, edited 1 time in total.
Text of all my messages is available under the terms of the GNU Free Documentation License: http://www.gnu.org/copyleft/fdl.html

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: SEF generates different urls

Post by AmyStephen » Thu Dec 13, 2007 2:18 pm

I agree with your modified post!  ;)

As I said, when the router stabilizes - certainly before v 1.5 goes live - system plugins will emerge to complete the URL of our dreams!

These system plugins will be possible due to the work accomplished by the dev team. Made better by the community. As it should be! :)

That's how an open source project works - and it's working, just like it's supposed to work.  8)

++++

Returning to the specific topic, has anyone confirmed this fix?

Amy

User avatar
aliens
Joomla! Intern
Joomla! Intern
Posts: 87
Joined: Fri Sep 28, 2007 4:30 pm

Re: SEF generates different urls

Post by aliens » Fri Dec 14, 2007 5:34 pm

I am extremely happy to say this is now FIXED in the latest SVN (12 dec and up). The SEF url of an article remains the same regardless of where it is posted (menu/blogtype).

However, I would like to know how Joomla! now chooses what URL to attribute to an article. For example, I have an article that is posted on Frontpage, News menu (blog type) and Manufacturer menu (blog type as well). The article will have the same URL on all pages like this: site.com/manufacturer/id-cat/id-article. So, why does Jooma! choose the Manufacturer menu to create the permanent link?

P.S.: Something better would be to manually choose from which menu to create the link or, even better, to be able to choose to create links from categories/sections and not necessarily from menus (and to remove that darn id :D)
Last edited by aliens on Fri Dec 14, 2007 5:40 pm, edited 1 time in total.

User avatar
3wP
Joomla! Explorer
Joomla! Explorer
Posts: 261
Joined: Mon May 14, 2007 6:29 pm
Location: Norway

Re: SEF generates different urls

Post by 3wP » Sat Dec 15, 2007 12:10 am

Yo - check out the SVn now - really exiting things happening to SEF functions i believ. Cause if it's altered like it seems - it must be for something good :)
Fixed issues with relative urls, removed sef section from JModuleHelper
+ System SEF plugin
- Content SEF plugin
! Changes require a re-install or manual database update.  Check diff.sql for details.
+ more info on the svn - but all of this looks and sounds great...........

I'll update to the latest SVN tomorow and test it all properly :)

hmmmm, do i smell an RC4 right around the corner?
Last edited by 3wP on Sat Dec 15, 2007 12:14 am, edited 1 time in total.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19068
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: SEF generates different urls

Post by infograf768 » Sat Dec 15, 2007 7:45 am

Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: SEF generates different urls

Post by AmyStephen » Sat Dec 15, 2007 6:20 pm

aliens wrote: So, why does Jooma! choose the Manufacturer menu to create the permanent link?

P.S.: Something better would be to manually choose from which menu to create the link or, even better, to be able to choose to create links from categories/sections and not necessarily from menus (and to remove that darn id :D)
Of course it would! But, can't we at least celebrate taking the first step forward? SEF URLs were not supposed to be part of v 1.5 - unique system generated URLs were another step forward we were not expecting. Time to release. No, it's not "all" there. But, we can take the progress we have, stabilize it and use it, then take another step. They understand where to go - they need resources to do it, that's all.

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: SEF generates different urls

Post by AmyStephen » Sat Dec 15, 2007 6:39 pm

infograf768 wrote: UNhappily, issues remain.
See tracker for details.
http://joomlacode.org/gf/project/joomla ... em_id=8603
http://joomlacode.org/gf/project/joomla ... em_id=8598
Just to prevent a bit of confusion. The problem that is the subject of this thread still is resolved. This was a specific issue where the router was dropping a portion of the URL for the article page. Truly, this problem is resolved.

But, there are now new SEF URL issues as a result of the new plugin fix:

1. Legacy mode - and subdirectories - URLs (and all references) are not working.
2. Internal URLs are broken.

But, the problem in this thread is still resolved, though.

HTH,
Amy :)

User avatar
dan1dyoung
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 140
Joined: Fri Dec 09, 2005 6:18 pm
Location: England
Contact:

Re: SEF generates different urls

Post by dan1dyoung » Mon Dec 17, 2007 1:24 am

Hi Amy,

Just working on a plugin and am finding my addresses are incorrect (SEF on, running on windows), is the above why when i use JURI::current() i get 2 index.php references and if so what is the final outcome??

So it returns:
http://localhost/joomla/index.php/index.php


And the same for:
$URI =& JFactory::getURI()

$URI->current()

Also is it better to use JURI::current() in place of the above 2 lines (JFACTORY or JURI)??

And what is the command for just the domain (Just http://www.mydomain.com without any index.php)??

And just incase you can answer this for me!!!!

How can i change the below so it outputs in the email as the system URL's, so if SEF is on then it gives the SEF address type (Using JRoute i assume??)

$msg .= JText::_( 'link' ) . ' ' . $URI->current() . '?view=article&catid=' . JRequest::getInt( 'catid' ) . '&id=' . JRequest::getInt( 'id' ) . '&Itemid=' . JRequest::getInt( 'Itemid' ) . '&option=com_content' . "\n";

Thanks

Dan

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: SEF generates different urls

Post by AmyStephen » Mon Dec 17, 2007 5:23 am

Dan -

It's been a couple of days of whirlwind SEF URL activity. One issue the developers were addressing was this doubling (and tripling, etc.) of pieces of the URL. I'm not certain where this is going to end up. Might want to give it a day, or so, to settle.

Regarding your URL question, if you look at one of the core modules, you can see a good JRoute example (as you are guessing) that will "take care of" your non-SEF, or any-one-of-three-flavors of SEF URL creation. Just use that approach and you should be okay. (There's a discussion of this with one of our GHOP contestants about a Twitter module he is building that might be helpful.)

Thanks,
Amy :)

User avatar
aliens
Joomla! Intern
Joomla! Intern
Posts: 87
Joined: Fri Sep 28, 2007 4:30 pm

Re: SEF generates different urls

Post by aliens » Mon Dec 17, 2007 6:07 am

AmyStephen wrote:
aliens wrote: So, why does Jooma! choose the Manufacturer menu to create the permanent link?

P.S.: Something better would be to manually choose from which menu to create the link or, even better, to be able to choose to create links from categories/sections and not necessarily from menus (and to remove that darn id :D)
Of course it would! But, can't we at least celebrate taking the first step forward? SEF URLs were not supposed to be part of v 1.5 - unique system generated URLs were another step forward we were not expecting. Time to release. No, it's not "all" there. But, we can take the progress we have, stabilize it and use it, then take another step. They understand where to go - they need resources to do it, that's all.
Hey Amy,

I do agree it's a step in the right size, but could you answer my question? I would really like to know how does the Joomla! router now choose how to create the article URLs.

User avatar
yvolk
Joomla! Guru
Joomla! Guru
Posts: 979
Joined: Thu Jun 01, 2006 1:52 pm
Location: Moscow, Russia
Contact:

Re: SEF generates different urls

Post by yvolk » Mon Dec 17, 2007 7:07 am

aliens wrote: Hey Amy,

I do agree it's a step in the right size, but could you answer my question? I would really like to know how does the Joomla! router now choose how to create the article URLs.
Hi, try to get used to the fact, that the only authoritative answer to the question "how" lies in the code  :(: so look in the code of Joomla! core and find an answer. I really mean this  :).

...or, if you're not Pro in PHP, you have to test and figure it out from 'experiments'...
Last edited by yvolk on Mon Dec 17, 2007 7:10 am, edited 1 time in total.
Text of all my messages is available under the terms of the GNU Free Documentation License: http://www.gnu.org/copyleft/fdl.html

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: SEF generates different urls

Post by AmyStephen » Mon Dec 17, 2007 3:13 pm

Hi, try to get used to the fact, that the only authoritative answer to the question "how" lies in the code 
Yuri -

1. The Joomla! community has available that which members of the Joomla! community freely make available. If there is something else we desire, someone must voluntarily make that available. Eric Raymond calls that a scratch your own itch motivation and in sum, that is what drives output from an open source community.

2. Yes, we can look at the source code to find answers. Yes, we can figure out how things work by experimenting. In fact, that's kind of the point!

Freedom 1:
The freedom to study how the program works, and adapt it to your needs (freedom 1). Access to the source code is a precondition for this.
This type of software development process is not for everyone. Those who participate with Joomla! are free to choose to do those things they find interesting. No one is obligated to one another. We are a cooperative entity, moved forward by the dedication of volunteers who tend to perform better when they are encouraged.
aliens wrote: I do agree it's a step in the right size, but could you answer my question? I would really like to know how does the Joomla! router now choose how to create the article URLs.
I do not know the answer to your question. I avoid building websites with User Generated Duplicate Content. For me, it's a non-issue. I am thankful it was done, though, because so many people I have helped in the forums will benefit from this.

If you want to know "how", I would also encourage you to look at the source code or experiment with the Search Results. That is a good tool for discovering a pattern since it is an easy way to access content outside of the menu system. If I were to guess, I would assume the menu item with the lowest primary key would be considered primary. But, I am not at all confident in that answer.

Thanks,
Amy :)

User avatar
aliens
Joomla! Intern
Joomla! Intern
Posts: 87
Joined: Fri Sep 28, 2007 4:30 pm

Re: SEF generates different urls

Post by aliens » Mon Dec 17, 2007 4:55 pm

AmyStephen wrote: I do not know the answer to your question. I avoid building websites with User Generated Duplicate Content. For me, it's a non-issue. I am thankful it was done, though, because so many people I have helped in the forums will benefit from this.

If you want to know "how", I would also encourage you to look at the source code or experiment with the Search Results. That is a good tool for discovering a pattern since it is an easy way to access content outside of the menu system. If I were to guess, I would assume the menu item with the lowest primary key would be considered primary. But, I am not at all confident in that answer.

Thanks,
Amy :)
Hey Amy,

First, it's really not User Generated Duplicate Content. It's the system that generates variable article URLs. Thankfully, that has been fixed by adjusting the JRouter function to be the same in all com_content views.
(I assume you use the 'user' word because if the user doesn't link the article from two different places, there is no issue to be fixed. However that may also cripple site accessibility. Moreover, exagerating a bit, any issue can be atributed to users in similar ways).

As for the lowest primary key, I tested this theory but with no results. The router itself is how the URLs are generated permanently, and it's extremely hard to get around all those variables and understand them  :P
Last edited by aliens on Mon Dec 17, 2007 4:57 pm, edited 1 time in total.

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: SEF generates different urls

Post by AmyStephen » Mon Dec 17, 2007 6:38 pm

These are my terms - and this is what I mean when I use them:

System-generated duplicate content occurs when Joomla! uses more than one URL for the same webpage. There is nothing the user can do to fix these problems. Joomla! v 1.0.x has lots of these issues. Modules, the v 1.0.12 frontpage read more links, the search, etc.
- Joomla! v 1.5 with SEF URLs on does not create System-generated duplicate content.  8)

User-generated duplicate content occurs when the USER creates more than one web page (with a menu item) to the same article or component. If the user wants more than one menu item to the same article or component, the correct way to do so, without creating duplicate content, is to use an External Link menu type and the existing URL.

- It is a learning issue. User-generated duplicate content can be created or avoided by the user.

Hope that helps!
Amy :)


Locked

Return to “Joomla! 1.5 Coding”