Active
Project:
Import HTML
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Feb 2011 at 20:43 UTC
Updated:
20 Feb 2011 at 14:11 UTC
Many pages have imported, some have not, as in my other post. However, of the ones that have imported, most of the internal page links to other pages are not valid. They are looking for the old path, as listed in the bottom of the edit area, but I'm not finding them. I plan to run a link checked, but I'm wondering what the best way to FIND the new place where the page is located. Is there a faster method than just stumbling around and copying the entire dynamic link and posting it in the internal page area?
Help and direction for this newbie appreciated.
Jeff
Comments
Comment #1
dman commentedI can't suggest without seeing some real examples.
Need to know
- what the raw HTML link was originally
- what you expect it to become
- what happened instead.
You say "dynamic link" ? I'm not sure what that could be. URLs with query strings? They could be tricky within Drupal, but that's not an import issue really, it's something that needs to be addressed differently
Comment #2
jefferis commentedHere is a sample.
The original link is on this page is a relative link:
http://www.scholarscorner.com
to this page: http://www.scholarscorner.com/pardoned.html
Are you Pardoned or Paroled?<
But in my new import, rewrites it and it goes to here:
http://scholarscorner.com/?q=./pardoned.html
Now because I'm using a dns on my computer, I can access the site without the www on the new server while everyone else sees the old active site.
It is just odd though that the import of this link
I've turned on clean urls and it has helped a bit, but link check is pulling up 530 errors.
Comment #3
dman commentedOK, yep.
Now, relative links cannot be supported within Drupal, due to several factors. The worst of which is that /pardoned.html, /node/13 and /node/13/edit are all different URLs, and would resolve a relative link differently. Never mind starting with views and teasers...
So import_html will rewrite them all to root-relative - starting with the location of Drupal-root (in this, and the most normal case = '/').
That's what SHOULD happen.
Now, you are getting a './' instead of nothing.
In most contexts, './' in a path means nothing ( path/./file.txt == path/file.txt ) . If you had clean-urls on, this would resolve correctly.
This is NOT true for /?q=path/./file.txt - which will NOT be resolved correctly
An outstanding question however is - where did the ./ come from? I imagine at the URL-rewriting stage, some phase of the PHP scanning directories got a little confused. I HAVE seen something similar before, on some versions of PHP, dirname on an empty string adds this in. eg dirname('') ='./'
Simply, not mush extra testing has gone into running things without clean-urls. Partly because the basic assumption is that we are going to NEED clean-urls to replicate the site urls anyway.
Turning on the clean-urls happened before the most recent import, right?
Comment #4
jefferis commentedWell I tried a reimport of 2 pages with clean urls turned on and used overwrite merge, but instead of merging with the existing home/index.html page, it deleted it and now says "page not found" And I can't find a page in the content that matches the original home info. Bummer. Plus I found that some of the pages with links to a subfolder and a .php suffix did not import or get rewritten to for the default legacy url:
Message
Importing 'index.html'
Failed to get any results from the attempted analysis of index.html. The source file path was probably unavailable or not HTML.
Importing 'roundtable.htm'
Failed to get any results from the attempted analysis of roundtable.htm. The source file path was probably unavailable or not HTML.
No results! Failed to extract any new nodes
Comment #5
dman commentedThat's curious. There is no 'delete' ever called anywhere in the code, So I don;t know ahte made it appear like that.
And if you had a good import once,
- then turned on clean urls
- and the same import with the same parameters failed to parse the document next time
... I feel there may be some steps in the middle there that also changed something. I can't guess what.
Comment #6
jefferis commentedThe first attempt at a page, I saw the title, etc. being imported in the results, but the page just got erased instead of merged, updated or overwritten.
The second attempt produced results like:
Then got these errors:
But when I check for the home page, it returns to the default Welcome to Drupal page. My home page does not exist.
Both links result is PAGE NOT FOUND.
Comment #7
jefferis commentedOkay, REALLY ODD. I checked the results page and the complete XML DOM import content is there of the page, but I could not find the page anywhere, so
I recreated the Home page or index page and promoted it to the front page. Then I went into Primary Menus to put it back in its proper place, and I found 2 HOME pages listed. The other one node/88 magically reappeared. The new one, and identical page with the same alt path is node /154 and legacy path 'home.' I deleted home node/88. We'll see what is up.
Comment #8
dman commentedreally odd.
That message gets triggered when it's attempting to create a page, and first looks at the alias table to see if the path is already taken.
If so, it loads the node from there and merges over top
The message means that it found the alias OK, but it was pointing to a node that was no longer there. That shouldn't happen in the normal course of events - which is why it's complaining so bitterly. Even if you did delete the node (that's fine) then the aliases should have gone away with it.