HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Can't import news

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#71053 (In Topic #14989)

Honoured member

I'm trying to import all the news articles from one install to another to make a testbed site for my uncle, which is not the most savy techy.

When I first started I was using 7.01 on both sites.  I was able to import the articles but only half of them.  There's 226 articles going back some 400 days.  Once I had them, I could validate them but not delete them.

So I trashed the testbed install.  Upgraded the main site to 7.1 and then did a fresh install on the testbed site using 7.1.  Now when I try to import the news articles I'm getting the error:

Code

An error has occurred
XML error when parsing RSS/Atom stream: junk after document element at line 6

The url I'm using to import from is:

Code

http://stansjournal.com/backend.php?type=RSS2&mode=news&days=420&max=250&filter=1,8,9,10,11&keep_session=527656718

Since there's 60 articles in each of his current categories I've even tried reducing the max count to 60 and filter to a single category and still get the same thing.

What am I doing wrong?

Here's the full stack trace:

Code

 » An error has occurred
An error has occurred
XML error when parsing RSS/Atom stream: junk after document element at line 6 (version:
7.1, PHP version: 5.2.14, URL: /cms/index.php?page=cms_news&type=_import_news&keep_fatalistic=1&old_type=import)
You have turned on stack traces for all errors, via having keep_fatalistic=1
 in the URL. This means that this may not actually be a fatal error, you have just
asked for it to be presented as such (perhaps to help you find where it came from).
Here is the stack trace:
Below is a stack trace revealing the state the software was in when the error occurred.
If this represents a bug in the unmodified software, you may want to check ocPortal
website for a fix, and if there isn't one, report this as a bug. Please note that
merely posting a stack trace is not sufficient for us to solve your problem; the
stack trace is just an aid that presents us with additional information. We still
need to know the error message, what you tried to do, how you tried to do it, version
numbers, and any other appropriate information.
We apologise for this problem and if it's a bug we hope you will work with us so
that we can fix it for you promptly.
File
'/home/journal/public_html/testbed/sources/failure.php'
Line
'669'
Function
'get_html_trace'
Args
File
'/home/journal/public_html/testbed/sources/global2.php'
Line
'936'
Function
'_fatal_exit'
Args
'XML error when parsing RSS/Atom stream: junk after document element at line 6'
File
'/home/journal/public_html/testbed/sources/failure.php'
Line
'227'
Function
'fatal_exit'
Args
'XML error when parsing RSS/Atom stream: junk after document element at line 6'
File
'/home/journal/public_html/testbed/sources/global2.php'
Line
'896'
Function
'_generic_exit'
Args
'XML error when parsing RSS/Atom stream: junk after document element at line 6'
'WARN_SCREEN'
File
'/home/journal/public_html/testbed/cms/pages/modules/cms_news.php'
Line
'598'
Function
'warn_exit'
Args
'XML error when parsing RSS/Atom stream: junk after document element at line 6'
File
'/home/journal/public_html/testbed/cms/pages/modules/cms_news.php'
Line
'87'
Function
'_import_news'
Class
'Module_cms_news'
Type
'->'
Object
Module_cms_news::__set_state(array( 'lang_type' => 'NEWS', 'select_name' => 'TITLE',
'code_require' => 'news', 'permissions_require' => 'high', 'permissions_cat_require'
=> 'news', 'permissions_cat_name' => 'main_news_category', 'user_facing' => true,
'seo_type' => 'news', 'award_type' => 'news', 'possibly_some_kind_of_upload' => true,
'upload' => 'image', 'menu_label' => 'NEWS', 'orderer' => 'title', 'title_is_multi_lang'
=> true, 'donext_type' => NULL, 'module_type' => 'news', 'redirect_type' => NULL,
'javascript_require' => NULL, 'skip_validation' => false, 'default_type' => 'misc',
'author' => 'Chris Graham', 'organisation' => 'ocProducts', 'send_validation_request'
=> true, 'check_validation' => true, 'archive_entry_point' => NULL, 'archive_label'
=> NULL, 'view_entry_point' => NULL, 'protect_first' => 0, 'permission_page' => NULL,
'permission_module' => NULL, 'permissions_cat_require_b' => NULL, 'permissions_cat_name_b'
=> NULL, 'add_text' => '', 'edit_text' => '', 'extra_donext_entries' => NULL, 'extra_donext_categories'
=> NULL, 'extra_donext_whatever' => NULL, 'extra_donext_whatever_title' => NULL,
'do_next_editing_categories' => false, 'special_edit_frontend' => false, 'cat_aed_module'
=> Module_cms_news_cat::__set_state(array( 'lang_type' => 'NEWS_CATEGORY', 'select_name'
=> 'TITLE', 'permissions_require' => 'cat_high', 'permission_module' => 'news', 'javascript'
=> 'standardAlternateFields(\'file\',\'theme_img_code*\');', 'menu_label' => 'NEWS',
'table' => 'news_categories', 'orderer' => 'nc_title', 'title_is_multi_lang' => true,
'module_type' => NULL, 'redirect_type' => NULL, 'code_require' => NULL, 'javascript_require'
=> NULL, 'skip_validation' => false, 'default_type' => NULL, 'author' => 'Chris Graham',
'organisation' => 'ocProducts', 'user_facing' => false, 'send_validation_request'
=> true, 'check_validation' => true, 'archive_entry_point' => NULL, 'archive_label'
=> NULL, 'view_entry_point' => NULL, 'protect_first' => 0, 'permission_page' => NULL,
'permissions_cat_require' => NULL, 'permissions_cat_name' => NULL, 'permissions_cat_require_b'
=> NULL, 'permissions_cat_name_b' => NULL, 'add_text' => '', 'edit_text' => '', 'extra_donext_entries'
=> NULL, 'extra_donext_categories' => NULL, 'extra_donext_whatever' => NULL, 'extra_donext_whatever_title'
=> NULL, 'do_next_editing_categories' => false, 'special_edit_frontend' => false,
'upload' => NULL, 'possibly_some_kind_of_upload' => false, 'cat_aed_module' => NULL,
'alt_aed_module' => NULL, 'seo_type' => NULL, 'award_type' => NULL, 'posting_form_title'
=> NULL, 'posting_form_text' => '', 'posting_form_text_parsed' => NULL, 'type_code'
=> 'd', 'catalogue' => false, 'non_integer_id' => false, 'output_of_action_is_confirmation'
=> false, 'second_stage_preview' => false, 'add_submit_name' => NULL, 'edit_submit_name'
=> NULL, 'do_preview' => true, 'add_one_label' => NULL, 'add_one_cat_label' => NULL,
'edit_this_label' => NULL, 'edit_one_label' => NULL, 'edit_this_cat_label' => NULL,
'edit_one_cat_label' => NULL, 'do_next_description' => NULL, 'appended_actions_already'
=> false, 'select_name_description' => NULL, 'care_please' => true, 'new_id' => NULL,
'no_blank_ids' => true, 'table_prefix' => '', 'array_key' => 'id', )), 'alt_aed_module'
=> NULL, 'posting_form_title' => ocp_tempcode::__set_state(array( 'code_to_preexecute'
=> '$TPL_FUNCS[\'do_runtime_4e04643e123941.47190503\']="echo ecv(\\$cl,array(),2,\\"NEWS_ARTICLE\\",\\$parameters);";
', 'seq_parts' => array ( 0 => array ( 0 => 'do_runtime_4e04643e123941.47190503',
1 => array ( ), 2 => 2, 3 => 'NEWS_ARTICLE', 4 => '', ), ), 'preprocessable_bits'
=> array ( ), 'last_attach' => NULL, 'pure_lang' => true, 'codename' => ':container',
'cached_output' => NULL, )), 'posting_form_text' => '', 'posting_form_text_parsed'
=> NULL, 'javascript' => NULL, 'type_code' => 'd', 'catalogue' => false, 'non_integer_id'
=> false, 'output_of_action_is_confirmation' => false, 'second_stage_preview' =>
false, 'add_submit_name' => NULL, 'edit_submit_name' => NULL, 'do_preview' => true,
'add_one_label' => NULL, 'add_one_cat_label' => NULL, 'edit_this_label' => NULL,
'edit_one_label' => NULL, 'edit_this_cat_label' => NULL, 'edit_one_cat_label' =>
NULL, 'do_next_description' => NULL, 'appended_actions_already' => false, 'select_name_description'
=> NULL, 'care_please' => true, 'new_id' => NULL, 'no_blank_ids' => true, 'table_prefix'
=> '', 'array_key' => 'id', 'table' => NULL, ))
Args
File
'/home/journal/public_html/testbed/sources/aed_module.php'
Line
'188'
Function
'run_start'
Class
'Module_cms_news'
Type
'->'
Object
Module_cms_news::__set_state(array( 'lang_type' => 'NEWS', 'select_name' => 'TITLE',
'code_require' => 'news', 'permissions_require' => 'high', 'permissions_cat_require'
=> 'news', 'permissions_cat_name' => 'main_news_category', 'user_facing' => true,
'seo_type' => 'news', 'award_type' => 'news', 'possibly_some_kind_of_upload' => true,
'upload' => 'image', 'menu_label' => 'NEWS', 'orderer' => 'title', 'title_is_multi_lang'
=> true, 'donext_type' => NULL, 'module_type' => 'news', 'redirect_type' => NULL,
'javascript_require' => NULL, 'skip_validation' => false, 'default_type' => 'misc',
'author' => 'Chris Graham', 'organisation' => 'ocProducts', 'send_validation_request'
=> true, 'check_validation' => true, 'archive_entry_point' => NULL, 'archive_label'
=> NULL, 'view_entry_point' => NULL, 'protect_first' => 0, 'permission_page' => NULL,
'permission_module' => NULL, 'permissions_cat_require_b' => NULL, 'permissions_cat_name_b'
=> NULL, 'add_text' => '', 'edit_text' => '', 'extra_donext_entries' => NULL, 'extra_donext_categories'
=> NULL, 'extra_donext_whatever' => NULL, 'extra_donext_whatever_title' => NULL,
'do_next_editing_categories' => false, 'special_edit_frontend' => false, 'cat_aed_module'
=> Module_cms_news_cat::__set_state(array( 'lang_type' => 'NEWS_CATEGORY', 'select_name'
=> 'TITLE', 'permissions_require' => 'cat_high', 'permission_module' => 'news', 'javascript'
=> 'standardAlternateFields(\'file\',\'theme_img_code*\');', 'menu_label' => 'NEWS',
'table' => 'news_categories', 'orderer' => 'nc_title', 'title_is_multi_lang' => true,
'module_type' => NULL, 'redirect_type' => NULL, 'code_require' => NULL, 'javascript_require'
=> NULL, 'skip_validation' => false, 'default_type' => NULL, 'author' => 'Chris Graham',
'organisation' => 'ocProducts', 'user_facing' => false, 'send_validation_request'
=> true, 'check_validation' => true, 'archive_entry_point' => NULL, 'archive_label'
=> NULL, 'view_entry_point' => NULL, 'protect_first' => 0, 'permission_page' => NULL,
'permissions_cat_require' => NULL, 'permissions_cat_name' => NULL, 'permissions_cat_require_b'
=> NULL, 'permissions_cat_name_b' => NULL, 'add_text' => '', 'edit_text' => '', 'extra_donext_entries'
=> NULL, 'extra_donext_categories' => NULL, 'extra_donext_whatever' => NULL, 'extra_donext_whatever_title'
=> NULL, 'do_next_editing_categories' => false, 'special_edit_frontend' => false,
'upload' => NULL, 'possibly_some_kind_of_upload' => false, 'cat_aed_module' => NULL,
'alt_aed_module' => NULL, 'seo_type' => NULL, 'award_type' => NULL, 'posting_form_title'
=> NULL, 'posting_form_text' => '', 'posting_form_text_parsed' => NULL, 'type_code'
=> 'd', 'catalogue' => false, 'non_integer_id' => false, 'output_of_action_is_confirmation'
=> false, 'second_stage_preview' => false, 'add_submit_name' => NULL, 'edit_submit_name'
=> NULL, 'do_preview' => true, 'add_one_label' => NULL, 'add_one_cat_label' => NULL,
'edit_this_label' => NULL, 'edit_one_label' => NULL, 'edit_this_cat_label' => NULL,
'edit_one_cat_label' => NULL, 'do_next_description' => NULL, 'appended_actions_already'
=> false, 'select_name_description' => NULL, 'care_please' => true, 'new_id' => NULL,
'no_blank_ids' => true, 'table_prefix' => '', 'array_key' => 'id', )), 'alt_aed_module'
=> NULL, 'posting_form_title' => ocp_tempcode::__set_state(array( 'code_to_preexecute'
=> '$TPL_FUNCS[\'do_runtime_4e04643e123941.47190503\']="echo ecv(\\$cl,array(),2,\\"NEWS_ARTICLE\\",\\$parameters);";
', 'seq_parts' => array ( 0 => array ( 0 => 'do_runtime_4e04643e123941.47190503',
1 => array ( ), 2 => 2, 3 => 'NEWS_ARTICLE', 4 => '', ), ), 'preprocessable_bits'
=> array ( ), 'last_attach' => NULL, 'pure_lang' => true, 'codename' => ':container',
'cached_output' => NULL, )), 'posting_form_text' => '', 'posting_form_text_parsed'
=> NULL, 'javascript' => NULL, 'type_code' => 'd', 'catalogue' => false, 'non_integer_id'
=> false, 'output_of_action_is_confirmation' => false, 'second_stage_preview' =>
false, 'add_submit_name' => NULL, 'edit_submit_name' => NULL, 'do_preview' => true,
'add_one_label' => NULL, 'add_one_cat_label' => NULL, 'edit_this_label' => NULL,
'edit_one_label' => NULL, 'edit_this_cat_label' => NULL, 'edit_one_cat_label' =>
NULL, 'do_next_description' => NULL, 'appended_actions_already' => false, 'select_name_description'
=> NULL, 'care_please' => true, 'new_id' => NULL, 'no_blank_ids' => true, 'table_prefix'
=> '', 'array_key' => 'id', 'table' => NULL, ))
Args
'_import_news'
File
'/home/journal/public_html/testbed/sources/zones.php'
Line
'387'
Function
'run'
Class
'standard_aed_module'
Type
'->'
Object
Module_cms_news::__set_state(array( 'lang_type' => 'NEWS', 'select_name' => 'TITLE',
'code_require' => 'news', 'permissions_require' => 'high', 'permissions_cat_require'
=> 'news', 'permissions_cat_name' => 'main_news_category', 'user_facing' => true,
'seo_type' => 'news', 'award_type' => 'news', 'possibly_some_kind_of_upload' => true,
'upload' => 'image', 'menu_label' => 'NEWS', 'orderer' => 'title', 'title_is_multi_lang'
=> true, 'donext_type' => NULL, 'module_type' => 'news', 'redirect_type' => NULL,
'javascript_require' => NULL, 'skip_validation' => false, 'default_type' => 'misc',
'author' => 'Chris Graham', 'organisation' => 'ocProducts', 'send_validation_request'
=> true, 'check_validation' => true, 'archive_entry_point' => NULL, 'archive_label'
=> NULL, 'view_entry_point' => NULL, 'protect_first' => 0, 'permission_page' => NULL,
'permission_module' => NULL, 'permissions_cat_require_b' => NULL, 'permissions_cat_name_b'
=> NULL, 'add_text' => '', 'edit_text' => '', 'extra_donext_entries' => NULL, 'extra_donext_categories'
=> NULL, 'extra_donext_whatever' => NULL, 'extra_donext_whatever_title' => NULL,
'do_next_editing_categories' => false, 'special_edit_frontend' => false, 'cat_aed_module'
=> Module_cms_news_cat::__set_state(array( 'lang_type' => 'NEWS_CATEGORY', 'select_name'
=> 'TITLE', 'permissions_require' => 'cat_high', 'permission_module' => 'news', 'javascript'
=> 'standardAlternateFields(\'file\',\'theme_img_code*\');', 'menu_label' => 'NEWS',
'table' => 'news_categories', 'orderer' => 'nc_title', 'title_is_multi_lang' => true,
'module_type' => NULL, 'redirect_type' => NULL, 'code_require' => NULL, 'javascript_require'
=> NULL, 'skip_validation' => false, 'default_type' => NULL, 'author' => 'Chris Graham',
'organisation' => 'ocProducts', 'user_facing' => false, 'send_validation_request'
=> true, 'check_validation' => true, 'archive_entry_point' => NULL, 'archive_label'
=> NULL, 'view_entry_point' => NULL, 'protect_first' => 0, 'permission_page' => NULL,
'permissions_cat_require' => NULL, 'permissions_cat_name' => NULL, 'permissions_cat_require_b'
=> NULL, 'permissions_cat_name_b' => NULL, 'add_text' => '', 'edit_text' => '', 'extra_donext_entries'
=> NULL, 'extra_donext_categories' => NULL, 'extra_donext_whatever' => NULL, 'extra_donext_whatever_title'
=> NULL, 'do_next_editing_categories' => false, 'special_edit_frontend' => false,
'upload' => NULL, 'possibly_some_kind_of_upload' => false, 'cat_aed_module' => NULL,
'alt_aed_module' => NULL, 'seo_type' => NULL, 'award_type' => NULL, 'posting_form_title'
=> NULL, 'posting_form_text' => '', 'posting_form_text_parsed' => NULL, 'type_code'
=> 'd', 'catalogue' => false, 'non_integer_id' => false, 'output_of_action_is_confirmation'
=> false, 'second_stage_preview' => false, 'add_submit_name' => NULL, 'edit_submit_name'
=> NULL, 'do_preview' => true, 'add_one_label' => NULL, 'add_one_cat_label' => NULL,
'edit_this_label' => NULL, 'edit_one_label' => NULL, 'edit_this_cat_label' => NULL,
'edit_one_cat_label' => NULL, 'do_next_description' => NULL, 'appended_actions_already'
=> false, 'select_name_description' => NULL, 'care_please' => true, 'new_id' => NULL,
'no_blank_ids' => true, 'table_prefix' => '', 'array_key' => 'id', )), 'alt_aed_module'
=> NULL, 'posting_form_title' => ocp_tempcode::__set_state(array( 'code_to_preexecute'
=> '$TPL_FUNCS[\'do_runtime_4e04643e123941.47190503\']="echo ecv(\\$cl,array(),2,\\"NEWS_ARTICLE\\",\\$parameters);";
', 'seq_parts' => array ( 0 => array ( 0 => 'do_runtime_4e04643e123941.47190503',
1 => array ( ), 2 => 2, 3 => 'NEWS_ARTICLE', 4 => '', ), ), 'preprocessable_bits'
=> array ( ), 'last_attach' => NULL, 'pure_lang' => true, 'codename' => ':container',
'cached_output' => NULL, )), 'posting_form_text' => '', 'posting_form_text_parsed'
=> NULL, 'javascript' => NULL, 'type_code' => 'd', 'catalogue' => false, 'non_integer_id'
=> false, 'output_of_action_is_confirmation' => false, 'second_stage_preview' =>
false, 'add_submit_name' => NULL, 'edit_submit_name' => NULL, 'do_preview' => true,
'add_one_label' => NULL, 'add_one_cat_label' => NULL, 'edit_this_label' => NULL,
'edit_one_label' => NULL, 'edit_this_cat_label' => NULL, 'edit_one_cat_label' =>
NULL, 'do_next_description' => NULL, 'appended_actions_already' => false, 'select_name_description'
=> NULL, 'care_please' => true, 'new_id' => NULL, 'no_blank_ids' => true, 'table_prefix'
=> '', 'array_key' => 'id', 'table' => NULL, ))
Args
File
'/home/journal/public_html/testbed/sources/site.php'
Line
'960'
Function
'load_module_page'
Args
'cms/pages/modules/cms_news.php'
'cms_news'
File
'/home/journal/public_html/testbed/sources/site.php'
Line
'749'
Function
'request_page'
Args
'cms_news'
true
File
'/home/journal/public_html/testbed/cms/index.php'
Line
'50'
Function
'do_site'
Args
Parameters
lang
EN
MAX_FILE_SIZE
134217728
label_for__file_novalidate
Upload
require__file_novalidate
0
hidFileID_file_novalidate
-1
label_for__rss_feed_url
URL
rss_feed_url
http://stansjournal.com/backend.php?type=RSS2&mode=news&days=420&max=250&filter=1,8,9,10,11&keep_session=527656718
require__rss_feed_url
0


Last edit: by chipster
Back to the top
 
Posted
Rating:
#71063
Avatar

Since v6 we impose a memory limit on requests to ensure a stability. The large query you're doing is causing that limited to be exceeded (if you load up the RSS you'll see it itself is dying, which is why the RSS is then invalid).

If you are logged in as admin you can load up the RSS URL in your browser but with &keep_memory_limit_test=600 on the end of the URL (this will use your admin privileges to raise the limit to 600MB). Save the RSS, upload to your web server to some temporary place, and then give the importer the URL to that new temporary URL.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#71071

Honoured member

Man some times I feel like an a&&. I didn't open the main site back up after upgrading. It was brought to my attention that the site was closed. Once I opened it back up, I'm able to import the articles just fine if I go category by category. (Any one have any brain cells they can spare?)
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: