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

dman’s picture

I 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

jefferis’s picture

Here 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.

dman’s picture

OK, 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?

jefferis’s picture

Well 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

dman’s picture

That'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.

jefferis’s picture

The 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:

Message
Importing 'index.html'
Failed to get any results from the attempted analysis of index.html. The source file path was probably unavailable, invalid, or incorrect. Or it may have been a directory without an index. May also mean that an internal rule excluded the import. Even though I had selected an overwrite merge as my settings, the SKIP alternate settings was still active. I deleted that settings and used the default overwrite.

Then got these errors:

user warning: Something is seriously wrong, database may be out of sync. I found a reference to node '88' when looking up existing aliases, but that is not loaded as a valid node. We'll proceed by making a new node, cannot merge with the allegedly pre-existing one. I'm going to delete that for you. in /home/user/public_html/sites/all/modules/import_html/import_html_process.inc on line 1582.
user warning: Something is seriously wrong, database may be out of sync. I found a reference to node '131' when looking up existing aliases, but that is not loaded as a valid node. We'll proceed by making a new node, cannot merge with the allegedly pre-existing one. I'm going to delete that for you. in /home/user/public_html/sites/all/modules/import_html/import_html_process.inc on line 1582.

Message
Importing 'index.html'
Unable to tidy file - htmltidy was unavailable "$message". Returning the original source.
This document (known internally as 'node/88' ) should now be accessible via aliases as both 'home' and 'index.html'
Imported Node Welcome to the Scholars Corner with content from /home/user/public_html/scholarold/index.html . 0 % confident it's the right body element. [mem: 16.29 MB/16.4 MB]

But when I check for the home page, it returns to the default Welcome to Drupal page. My home page does not exist.

Batch import completed in 2 sec. 2 items processed (1 sec per item), You may find these pages listed under the primary-links menu :
/home : Welcome to the Scholars Corner
/roundtable : roundtable

Both links result is PAGE NOT FOUND.

jefferis’s picture

Okay, 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.

dman’s picture

really 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.