Would it be possible to automatically change internal links in joomla content (that link to other joomla content) to the appropriate link to a drupal node?

In my joomla site I have quite a few links like "/index.php/content/view/180/48/" which would have to be changed to "/node/67" with the joomla id replaced by the correct drupal id. The joomla URLs could vary for different joomla installation due to clean url settings, which makes things more complicated.

I have not that much content, so I could also do it by hand, but it would be a very nice feature for me.

I'd also like to thank you for developing this module, without it my planned move to Drupal would be impossible.

Comments

malclocke’s picture

Hi DoctorWho,

I intend to implement redirects for all the old Joomla URL's in the near future, so your internal links would not need changing because they would redirect to the Drupal URL. Hopefully that will provide a solution, if not the ideal one. A patch for search and replace of links in URL's would be welcomed if anyone feels like rolling one, but would need to accommodate the fact that the URL above can be represented in a number of ways, i.e.:

/index.php/content/view/180/48
/content/view/180/48
/index.php?option=com_content&task=view&id=140&Itemid=48

And if OpenSEF or similar has been used then thats a whole new can of worms.

Malc

shark’s picture

In the mean time, anyone fixing content by hand can use a SQL query something like this to find a list of Drupal node ids that need to get fixed:

SELECT nid FROM node_revisions WHERE (body LIKE "%href=\"index\.php%" OR body LIKE "%href=\"/c%" OR teaser LIKE "%href=\"index\.php%" OR teaser LIKE "%href=\"/c%");

Hope that helps.

ParisLiakos’s picture

Version: 6.x-1.0-alpha2 » 7.x-1.x-dev
Priority: Minor » Major

I believe this feature is something that should be already be implemented, but like DoctorWho said its very complicated:/

ParisLiakos’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Priority: Major » Normal