Hi,
I'm using the latest 6.1.x-dev import_html, PHP 5.3, LInux.
I can get over 800 articles imported into my CCK nodes, but I've only really been able to set the standard node fields - "title" and "body". I've added in field_factuality, field_subtitle, field_author, and field_date (which is text for now).
(PS I am using the simplehtmltosimple... xsl stylesheet, not the html... one)
If I switch on debugging and leave the temporary files I can see that the xsl has retrieved my
...
[title] => Quantum Mechanics Of Sandwiches In Lunchboxes
[factuality] => SemiReal
[subtitle] =>
Sandwiches Are Actually Different At Different Locations
[author] => Roel van der Meulen
[date] => 1993/12/09
...
BUT this data never makes it into my CCK nodes.
(Using the current released CCK module)
Any suggestions?
Is this an XSLT problem? I don't see how since the fields appear in the data_structure file.
In theory I can change my html files so that they are more ffully semantically marked up - HOWEVER every so often something breaks and import_html can no longer parse the files, and I spend ages trying to figure out what went wrong.
Comments
Comment #1
alexmc commentedI should also state that I have not been able to extract any keywords (which I would like inserted and linked to taxonomy terms).
But that might be a separate issue.
Comment #2
alexmc commentedSome more info...
PHP Version 5.3.2-1ubuntu4.5
XSL enabled
libxslt Version 1.1.26
libxslt compiled against libxml Version 2.7.6
EXSLT enabled
libexslt Version 1.1.26
I am also getting these warnings...
warning: Parameter 2 to menu_import_html() expected to be a reference, value given in /var/www/fake_galactic-guide/includes/module.inc on line 483.
warning: Parameter 2 to node_import_html() expected to be a reference, value given in /var/www/fake_galactic-guide/includes/module.inc on line 483.
warning: Parameter 2 to path_import_html() expected to be a reference, value given in /var/www/fake_galactic-guide/includes/module.inc on line 483.
warning: Parameter 2 to taxonomy_import_html() expected to be a reference, value given in /var/www/fake_galactic-guide/includes/module.inc on line 483.
warning: Parameter 2 to user_import_html() expected to be a reference, value given in /var/www/fake_galactic-guide/includes/module.inc on line 483.
warning: Parameter 2 to content_import_html() expected to be a reference, value given in /var/www/fake_galactic-guide/includes/module.inc on line 483.
warning: Parameter 2 to menu_import_html_after_save() expected to be a reference, value given in /var/www/fake_galactic-guide/includes/module.inc on line 483.
warning: Parameter 2 to path_import_html_after_save() expected to be a reference, value given in /var/www/fake_galactic-guide/includes/module.inc on line 483.
warning: Parameter 2 to menu_import_html() expected to be a reference, value given in /var/www/fake_galactic-guide/includes/module.inc on line 483.
Comment #3
dman commentedLooks good.
The debugging logging at stage 5 (the data structure you printed above) is just before the node gets saved, so yes, the CCK field (if named 'field_factuality') should indeed be mapping that data to the node immediately afterwards.
If that field is attached to that node type.
Could be a bug, but I just did exactly that with the current 6.x--1 dev, and it's working as expected for me.
Keywords will only (should) link to taxonomy keywords if it's a freetagging vocab, it doesn't add new tags unless extra things are set. That should be chosen in "Absorb keywords as tags" in the import profile. (not tested recently in dev, may have broken, but it used to work.)
Comment #4
alexmc commented> Could be a bug
Er, thanks.
So basically it does work normally, there may be something funny with my set up. I need to debug it myself some more.
:-) and :-(
by "freetagging vocab" do you mean that "Tags" is ticked on the Vocabulary "Terms are created by users when submitting posts by typing a comma separated list." or is there something more special abot a freetagging vocab?
Comment #5
dman commentedWell, "cannot replicate" plus "cannot guess why it doesn't work for you but does for me" means yeah, a bit of investigation from your end.
The fact that it's FINDING the data and putting it into the pre-save node object means it's 90% there. Need to check
import_html/modules/content.inc:content_import_html()and find why the tag name is not patching across to the field nameIt's a small function, readable .
...
..
. and, um, only works with text fields so far! Could that be it?
Go patch it!!
Comment #6
alexmc commentedFeel free to close this issue :-)
Am pretty sure that this is a PHP 5.3 problem relating to the warnings received. I've gotten this working by applying various patches to remove the warnings. It would be cool if the HEAd was updated to cater for PHP 5.3
Gimme a shout if you want a formal patch that you can apply to the source code control.
(Not your problem:) PHP should not be giving warnings when they break the code :-( That is known in the trade as an "Error".
Comment #7
dman commentedClearing the old 6.x issues from the issue queue for a cleanup.
'fileds' handling in D7 was totally rebuilt.