×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Number added to every URL on import

Number added to every URL on import 12 years 8 months ago #15538

  • Matthew Friend
  • Matthew Friend's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Hi Support:

I want to say up front that I really like CMigrator. It is the only extension I tried that allowed my categories to transfer over nested.

I do have one issue with the URLS adding numbers when imported.

I use fancy urls in wordpress (/%postname%.html ).

The links on my website (learntheology.com) look like this:

/sin-calvinist.html

The links to the article though when imported look like this:
/232sin-calvinist.html

I could go in and manually change each link, but I have more than 550 articles on the site. Is there something in particular I should be doing to avoid this?

I am using the latest versions of Wordpress and Joomla.

Thanks,
Matthew

Re: Number added to every URL on import 12 years 8 months ago #15540

  • Robert Vining
  • Robert Vining's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Karma: 1
  • Thank you received: 0
I'm not support, but the issue with the number in the URL is a Joomla issue and is done automatically by the default Joomla SEF. The number you see there is the Article ID.

2 ways to fix this issue.

1. Go and create a Joomla Menu item to every single article. (usually not the best option if you have very many articles... and sounds like you do if it shows 232 in your example.)

2. Use a 3rd Party SEF component like sh404 which will allow you to have your old style URL's back without the number.

Re: Number added to every URL on import 12 years 8 months ago #15541

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Guys!
I answered this question already this morning, but because our hosting provider experienced some troubles with the MySQL server my reply was lost. Actually we are running on a backup of the database from 15h ago.

Anyway. Here is what I wrote this morning.

We are adding those number because we can run into duplicate aliases. And if we have duplicate aliases then we won't have the right urls to articles.

If you are absolutely sure that you won't run into this problem you can go to:
administrator/components/com_cmigrator/library/migrators/com_content/wordpress.php (if you use the k2 migrator then check it in the com_k2 folder)
on line 203:
$alias = JFilterOutput::stringURLSafe($i . ($post->post_title));
change it to
$alias = JFilterOutput::stringURLSafe(($post->post_title));

Now import again and your content should not have the number in the alias. However as Robert said - joomla will most probably add the article-id in front of the alias... And as Robert said -> you can control this stuff with component such as sh404 or joomSef or other well known components

Cheers and hopefully our db won't experience another meltdown today :)

Daniel

P.S. I said it before and I'll say it now - it would be really cool if you could write a review here: extensions.joomla.org/extensions/migrati...mport-a-export/19583

Re: Number added to every URL on import 12 years 8 months ago #15544

  • Robert Vining
  • Robert Vining's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Karma: 1
  • Thank you received: 0
Thanks for clarifying that Daniel. I thought it was all Joomla doing it.

Re: Number added to every URL on import 12 years 8 months ago #15546

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Robert,
Nope, we are doing this. :)

Let us say that you are writing an article with the title "Something". Next week you write another article and call it again "Something" -> when you try to save your article joomla will refuse to do so and will tell you to think of another alias for it. That is why I needed to ensure that when we import the articles we have unique aliases.

Cheers,
Daniel
The following user(s) said Thank You: Matthew Friend

Re: Number added to every URL on import 12 years 8 months ago #15548

  • Matthew Friend
  • Matthew Friend's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Thank you very much Daniel!

I was able to copy the 525+ articles and categories over into Joomla perfectly!

This is really an awesome component and your support is really good!

Thank you,
Matthew
  • Page:
  • 1
Time to create page: 0.114 seconds