Support » Plugin: FG Joomla to WordPress » Modify internal links not working after succesfull import

  • Hello, Frédéric.
    I am using WordPress 3.8 on Ubuntu 12.04.

    When I Import from the Joomla 1.5.14 to WordPress everything seems to be imported correctly(category, pages(I set the “Import as pages instead of blog posts”) and medias).All good up to this point.

    My main problem is that I have a lot of internal links between pages and when I imported the first thing I did was to :
    1) Remove the prefixes from the categories
    2)Modify internal links

    The interal links don’t point to the right pages(only about 10 % of the overall number of links pointed to the correct page).Please assist me on this matter.
    The other problem I had was, when I tried to access http://localhost it started loading untin an error printed on the screen saying:

    This webpage has a redirect loop

    The webpage at http://localhost/sms-bill/shema4_smsobiavi/ has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
    Learn more about this problem.
    Error code: ERR_TOO_MANY_REDIRECTS “

    Now, I don’t understand why it loads this page(it’s not set as the default landing static page in the “Customization” tab in the admin panel).

    http://wordpress.org/plugins/fg-joomla-to-wordpress/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Kerfred

    (@kerfred)

    For the internal links, please double check what you filled in the URL field. You must put the URL of the Joomla home page.

    For the redirect loop, I can’t help you because it is not related to the plugin.

    Thread Starter 66halo66

    (@66halo66)

    this is what I filled in the URL field:

    http://i41.tinypic.com/mviy2o.gif

    this is(at least I think) the URL of the Joomla homepage

    Thread Starter 66halo66

    (@66halo66)

    Edit: I resolved the problem with redirect loop – I added www to the URL, but the main problem with the internal links still stands.

    Plugin Author Kerfred

    (@kerfred)

    Can you show me an example of an internal link that is in a Joomla article and that is not converted properly?

    Thread Starter 66halo66

    (@66halo66)

    Hey, mate, sorry for the late response, I solved the problem.It was in the main php file, the private function get_joomla_id_in_link($link) :

    // With URL rewriting
    elseif ( preg_match(“#(.*)/(\d+)-(.*)#”, $link, $matches) ) {
    $meta_key_value[‘meta_value’] = $matches[2];
    }
    So… my boss told me the problem was with the URL rewriting – the “-(.*)” part from the regular expression makes the internal link modifying process semi-sucessful, so it doesn’t need the dash.When this part of the regular expression is removed it fixes up to 98 % of the internal links(so far in the test from 30 links, only one is not properly connected, which is good I guess).

    If anyone here is having the sam problem as I had – refer to this page, open the fg-joomla-to-wordpress.php file, go to the line :
    // With URL rewriting
    elseif ( preg_match(“#(.*)/(\d+)-(.*)#”, $link, $matches) ) { $meta_key_value[‘meta_value’] = $matches[2];
    }
    and delete the “-(.*)” part from the regular expression.It should look like this :
    // With URL rewriting
    elseif ( preg_match(“#(.*)/(\d+)#”, $link, $matches) ) {
    $meta_key_value[‘meta_value’] = $matches[2];
    }

    Plugin Author Kerfred

    (@kerfred)

    Thanks.
    But before doing these modifications on the plugin, can you give me an example of a link that is not modified with the original code?
    Normally, the Joomla SEF URLs follow this pattern: /{joomla_article_id}-{joomla_article_name}.
    So, deleting -(.*) will match more links but will match also non internal links.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Modify internal links not working after succesfull import’ is closed to new replies.