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.


Having problem importing data into Links catalogue

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#57072 (In Topic #12416)
Avatar

Community saint

Your CSV file's fields do not match with the selected catalogue's fields. Please check the field titles of your CSV file and try again.

I have been trying for some time to import CSV data into the Links catalogue, havent tried any other assuming it was all the same routine. I am, for simplicity to see how it works using only the Field titles and an entry for each of the 6 fields. When I import data I get the message and stack trace below.

My data for import is as follows:

Title,URL,Description,Organization,Date,Keywords
Fossil News,http://www.fossilnews.com/,"A monthly magazine published specifically with the fossil enthusiast or avocational paleontologist in mind.",Fossil News,2003/4/19 0:00:00,"Fossil News, fossils, magazines"

An error has occurred

Your CSV file's fields do not match with the selected catalogue's fields. Please check the field titles of your CSV file and try again. (version: 4.2.2, PHP version: 5.2.11, URL: /~prehisto/cms/index.php?page=cms_catalogues&type=_import&old_type=import&catalogue_name=links&keep_fatalistic=1)

I would include the stack trace but I get a message is too long warning.






Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#57086
Avatar

Hi,

Add a 'CATEGORY' column to your CSV. You can put the titles of existing categories, or create new titles (for which categories will be auto-created).

In 4.3.0-final we will make it so you don't need to do this.


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:
#57093
Avatar

Community saint

I added a category column like you advised and when I uploaded the data which seemed to work. The screen declared that my actions were successful! Goodie, I think. I went to open the catalogue category and got a stack trace -> unfortunately I did not record the trace and thought I would just delete the category and start over. Well I did but when I went back to open the basic LINKS catalogue I got the stack trace below.

The LINKS catalogue is messed up even though the other catalogues like FAQ, CONTACTS and PRODUCTS all work. So now I'm not exactly sure what to do next...?

An error has occurred

PHP NOTICE [8] Undefined offset: 1 in /home/prehisto/public_html/sources/hooks/modules/catalogue_fields/date.php on line 82 (version: 4.2.2, PHP version: 5.2.11, URL: /~prehisto/site/index.php?page=catalogues&type=category&id=links&catalogue_name=links)

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/prehisto/public_html/sources/failure.php'
Line'538'
Function'get_html_trace'
Args



File'/home/prehisto/public_html/sources/global2.php'
Line'807'
Function'_fatal_exit'
Args'PHP NOTICE [8] Undefined offset: 1 in /home/prehisto/public_html/sources/hooks/modules/catalogue_fields/date.php on line 82'




File'/home/prehisto/public_html/sources/failure.php'
Line'147'
Function'fatal_exit'
Args'PHP NOTICE [8] Undefined offset: 1 in /home/prehisto/public_html/sources/hooks/modules/catalogue_fields/date.php on line 82'




File'/home/prehisto/public_html/sources/global2.php'
Line'678'
Function'_ocportal_error_handler'
Args'notice'

8

'Undefined offset: 1'

'/home/prehisto/public_html/sources/hooks/modules/catalogue_fields/date.php'

82




File'/home/prehisto/public_html/sources/hooks/modules/catalogue_fields/date.php'
Line'82'
Function'ocportal_error_handler'
Args8

'Undefined offset: 1'

'/home/prehisto/public_html/sources/hooks/modules/catalogue_fields/date.php'

82

array ( 'ev' => '2003/4/19 0:00:00', 'bits' => array ( 0 => '2003/4/19', 1 => '0:00:00', ), 'date_bits' => array ( 0 => '2003/4/19', ), 'time_bits' => array ( 0 => '0', 1 => '00', 2 => '00', ), )




File'/home/prehisto/public_html/sources/catalogues.php'
Line'336'
Function'render_field_value'
Class'Hook_catalogue_field_date'
Type'->'
ObjectHook_catalogue_field_date::__set_state(array( ))
Args'2003/4/19 0:00:00'

'links'

4

NULL




File'/home/prehisto/public_html/sources/catalogues.php'
Line'165'
Function'get_catalogue_entry_map'
Argsarray ( 'id' => 2, 'c_name' => 'links', 'cc_id' => 3, 'ce_submitter' => 2, 'ce_add_date' => 1261959738, 'ce_edit_date' => NULL, 'ce_views' => 0, 'ce_views_prior' => 0, 'ce_validated' => 0, 'notes' => '', 'allow_rating' => 1, 'allow_comments' => 1, 'allow_trackbacks' => 1, 'ce_last_moved' => 1261959738, )

array ( 'c_name' => 'links', 'c_title' => 220, 'c_description' => 221, 'c_display_type' => 2, 'c_is_tree' => 1, 'c_notes' => '', 'c_add_date' => 1261029951, 'c_submit_points' => 0, 'c_ecommerce' => 0, 'c_send_view_reports' => 'never', )

'CATEGORY'

'links'

3

array ( 0 => array ( 'id' => 14, 'c_name' => 'links', 'cf_name' => 224, 'cf_description' => 225, 'cf_type' => 'short_trans', 'cf_order' => 0, 'cf_defines_order' => 1, 'cf_visible' => 1, 'cf_searchable' => 1, 'cf_default' => '', 'cf_required' => 1, 'cf_put_in_category' => 1, 'cf_put_in_search' => 1, ), 1 => array ( 'id' => 15, 'c_name' => 'links', 'cf_name' => 226, 'cf_description' => 227, 'cf_type' => 'url', 'cf_order' => 1, 'cf_defines_order' => 0, 'cf_visible' => 1, 'cf_searchable' => 1, 'cf_default' => '', 'cf_required' => 1, 'cf_put_in_category' => 0, 'cf_put_in_search' => 1, ), 2 => array ( 'id' => 16, 'c_name' => 'links', 'cf_name' => 228, 'cf_description' => 229, 'cf_type' => 'long_trans', 'cf_order' => 2, 'cf_defines_order' => 0, 'cf_visible' => 1, 'cf_searchable' => 1, 'cf_default' => '', 'cf_required' => 0, 'cf_put_in_category' => 1, 'cf_put_in_search' => 1, ), 3 => array ( 'id' => 42, 'c_name' => 'links', 'cf_name' => 2148, 'cf_description' => 2147, 'cf_type' => 'short_text', 'cf_order' => 3, 'cf_defines_order' => 0, 'cf_visible' => 1, 'cf_searchable' => 1, 'cf_default' => '', 'cf_required' => 1, 'cf_put_in_category' => 1, 'cf_put_in_search' => 1, ), 4 => array ( 'id' => 43, 'c_name' => 'links', 'cf_name' => 2150, 'cf_description' => 2149, 'cf_type' => 'date', 'cf_order' => 4, 'cf_defines_order' => 0, 'cf_visible' => 1, 'cf_searchable' => 1, 'cf_default' => '', 'cf_required' => 1, 'cf_put_in_category' => 1, 'cf_put_in_search' => 1, ), 5 => array ( 'id' => 45, 'c_name' => 'links', 'cf_name' => 2272, 'cf_description' => 2271, 'cf_type' => 'short_text', 'cf_order' => 5, 'cf_defines_order' => 0, 'cf_visible' => 1, 'cf_searchable' => 1, 'cf_default' => '', 'cf_required' => 1, 'cf_put_in_category' => 1, 'cf_put_in_search' => 1, ), )

NULL

false

false

0




File'/home/prehisto/public_html/site/pages/modules/catalogues.php'
Line'535'
Function'get_catalogue_category_entry_buildup'
Args3

'links'

array ( 'c_name' => 'links', 'c_title' => 220, 'c_description' => 221, 'c_display_type' => 2, 'c_is_tree' => 1, 'c_notes' => '', 'c_add_date' => 1261029951, 'c_submit_points' => 0, 'c_ecommerce' => 0, 'c_send_view_reports' => 'never', )

'CATEGORY'

'links'

30

0

NULL

3




File'/home/prehisto/public_html/site/pages/modules/catalogues.php'
Line'455'
Function'view_catalogue_category'
Class'Module_catalogues'
Type'->'
ObjectModule_catalogues::__set_state(array( ))
Args



File'/home/prehisto/public_html/sources/zones.php'
Line'331'
Function'run'
Class'Module_catalogues'
Type'->'
ObjectModule_catalogues::__set_state(array( ))
Args



File'/home/prehisto/public_html/sources/site.php'
Line'884'
Function'load_module_page'
Args'site/pages/modules/catalogues.php'

'catalogues'




File'/home/prehisto/public_html/sources/site.php'
Line'702'
Function'request_page'
Args'catalogues'

true




File'/home/prehisto/public_html/site/index.php'
Line'51'
Function'do_site'
Args


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#57094
Avatar

This is actually due to the date.php file I attached in another topic. Could you try this one please (I haven't tested here properly, just trying to get a quick fix out first):

Attachment
» Download: date.php (4 Kb, 243 downloads so far)


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:
#57095
Avatar

Community saint

OK, put in the file date.php in /sources/hooks/modules/catalogue_fields/ after renaming the original date file to date_old.php then tried to access the Catalog LINKS and got a slightly different stack trace this time.

An error has occurred

PHP NOTICE [8] Undefined offset: 1 in /home/prehisto/public_html/sources/hooks/modules/catalogue_fields/date.php on line 87 (version: 4.2.2, PHP version: 5.2.11, URL: /~prehisto/site/index.php?page=catalogues&type=category&id=links&catalogue_name=links)

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/prehisto/public_html/sources/failure.php'
Line'538'
Function'get_html_trace'
Args



File'/home/prehisto/public_html/sources/global2.php'
Line'807'
Function'_fatal_exit'
Args'PHP NOTICE [8] Undefined offset: 1 in /home/prehisto/public_html/sources/hooks/modules/catalogue_fields/date.php on line 87'




File'/home/prehisto/public_html/sources/failure.php'
Line'147'
Function'fatal_exit'
Args'PHP NOTICE [8] Undefined offset: 1 in /home/prehisto/public_html/sources/hooks/modules/catalogue_fields/date.php on line 87'




File'/home/prehisto/public_html/sources/global2.php'
Line'678'
Function'_ocportal_error_handler'
Args'notice'

8

'Undefined offset: 1'

'/home/prehisto/public_html/sources/hooks/modules/catalogue_fields/date.php'

87




File'/home/prehisto/public_html/sources/hooks/modules/catalogue_fields/date.php'
Line'87'
Function'ocportal_error_handler'
Args8

'Undefined offset: 1'

'/home/prehisto/public_html/sources/hooks/modules/catalogue_fields/date.php'

87

array ( 'ev' => '2003/4/19 0:00:00', 'bits' => array ( 0 => '2003/4/19', 1 => '0:00:00', ), 'date_bits' => array ( 0 => '2003/4/19', ), 'time_bits' => array ( 0 => '0', 1 => '00', 2 => '00', ), )




File'/home/prehisto/public_html/sources/catalogues.php'
Line'336'
Function'render_field_value'
Class'Hook_catalogue_field_date'
Type'->'
ObjectHook_catalogue_field_date::__set_state(array( ))
Args'2003/4/19 0:00:00'

'links'

4

NULL




File'/home/prehisto/public_html/sources/catalogues.php'
Line'165'
Function'get_catalogue_entry_map'
Argsarray ( 'id' => 2, 'c_name' => 'links', 'cc_id' => 3, 'ce_submitter' => 2, 'ce_add_date' => 1261959738, 'ce_edit_date' => NULL, 'ce_views' => 0, 'ce_views_prior' => 0, 'ce_validated' => 0, 'notes' => '', 'allow_rating' => 1, 'allow_comments' => 1, 'allow_trackbacks' => 1, 'ce_last_moved' => 1261959738, )

array ( 'c_name' => 'links', 'c_title' => 220, 'c_description' => 221, 'c_display_type' => 2, 'c_is_tree' => 1, 'c_notes' => '', 'c_add_date' => 1261029951, 'c_submit_points' => 0, 'c_ecommerce' => 0, 'c_send_view_reports' => 'never', )

'CATEGORY'

'links'

3

array ( 0 => array ( 'id' => 14, 'c_name' => 'links', 'cf_name' => 224, 'cf_description' => 225, 'cf_type' => 'short_trans', 'cf_order' => 0, 'cf_defines_order' => 1, 'cf_visible' => 1, 'cf_searchable' => 1, 'cf_default' => '', 'cf_required' => 1, 'cf_put_in_category' => 1, 'cf_put_in_search' => 1, ), 1 => array ( 'id' => 15, 'c_name' => 'links', 'cf_name' => 226, 'cf_description' => 227, 'cf_type' => 'url', 'cf_order' => 1, 'cf_defines_order' => 0, 'cf_visible' => 1, 'cf_searchable' => 1, 'cf_default' => '', 'cf_required' => 1, 'cf_put_in_category' => 0, 'cf_put_in_search' => 1, ), 2 => array ( 'id' => 16, 'c_name' => 'links', 'cf_name' => 228, 'cf_description' => 229, 'cf_type' => 'long_trans', 'cf_order' => 2, 'cf_defines_order' => 0, 'cf_visible' => 1, 'cf_searchable' => 1, 'cf_default' => '', 'cf_required' => 0, 'cf_put_in_category' => 1, 'cf_put_in_search' => 1, ), 3 => array ( 'id' => 42, 'c_name' => 'links', 'cf_name' => 2148, 'cf_description' => 2147, 'cf_type' => 'short_text', 'cf_order' => 3, 'cf_defines_order' => 0, 'cf_visible' => 1, 'cf_searchable' => 1, 'cf_default' => '', 'cf_required' => 1, 'cf_put_in_category' => 1, 'cf_put_in_search' => 1, ), 4 => array ( 'id' => 43, 'c_name' => 'links', 'cf_name' => 2150, 'cf_description' => 2149, 'cf_type' => 'date', 'cf_order' => 4, 'cf_defines_order' => 0, 'cf_visible' => 1, 'cf_searchable' => 1, 'cf_default' => '', 'cf_required' => 1, 'cf_put_in_category' => 1, 'cf_put_in_search' => 1, ), 5 => array ( 'id' => 45, 'c_name' => 'links', 'cf_name' => 2272, 'cf_description' => 2271, 'cf_type' => 'short_text', 'cf_order' => 5, 'cf_defines_order' => 0, 'cf_visible' => 1, 'cf_searchable' => 1, 'cf_default' => '', 'cf_required' => 1, 'cf_put_in_category' => 1, 'cf_put_in_search' => 1, ), )

NULL

false

false

0




File'/home/prehisto/public_html/site/pages/modules/catalogues.php'
Line'535'
Function'get_catalogue_category_entry_buildup'
Args3

'links'

array ( 'c_name' => 'links', 'c_title' => 220, 'c_description' => 221, 'c_display_type' => 2, 'c_is_tree' => 1, 'c_notes' => '', 'c_add_date' => 1261029951, 'c_submit_points' => 0, 'c_ecommerce' => 0, 'c_send_view_reports' => 'never', )

'CATEGORY'

'links'

30

0

NULL

3




File'/home/prehisto/public_html/site/pages/modules/catalogues.php'
Line'455'
Function'view_catalogue_category'
Class'Module_catalogues'
Type'->'
ObjectModule_catalogues::__set_state(array( ))
Args



File'/home/prehisto/public_html/sources/zones.php'
Line'331'
Function'run'
Class'Module_catalogues'
Type'->'
ObjectModule_catalogues::__set_state(array( ))
Args



File'/home/prehisto/public_html/sources/site.php'
Line'884'
Function'load_module_page'
Args'site/pages/modules/catalogues.php'

'catalogues'




File'/home/prehisto/public_html/sources/site.php'
Line'702'
Function'request_page'
Args'catalogues'

true




File'/home/prehisto/public_html/site/index.php'
Line'51'
Function'do_site'
Args


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#57096
Avatar

Community saint

Now I am having problem with the other 3 catalogues, FAQ, CONTACTS and PRODUCTS. When I go Any of the 3 Catalogues and click on the edit catalogue button I get a stack trace also. None of the other control functions seem to be affected.

The error messages are identical except for a few differences, this is the paragraph they start with:

from FAQ:
Missing class: Hook_catalogue_field_date_old (version: 4.2.2, PHP version: 5.2.11, URL: /~prehisto/cms/index.php?page=cms_catalogues&type=_edit_cata
logue&id=faqs&redirect=http%3A%2F%2F206.123.100.130%2F%7Epre
h
isto%2Fsite%2Findex.php%3Fpage%3Dcatalogues%26type%3Dindex%2
6
id%3Dfaqs)

from CONTACTS:
Missing class: Hook_catalogue_field_date_old (version: 4.2.2, PHP version: 5.2.11, URL: /~prehisto/cms/index.php?page=cms_catalogues&type=_edit_cata
logue&id=contacts&redirect=http%3A%2F%2F206.123.100.130%2F%7
E
prehisto%2Fsite%2Findex.php%3Fpage%3Dcatalogues%26type%3Dind
e
x%26id%3Dcontacts)

from PRODUCTS:
Missing class: Hook_catalogue_field_date_old (version: 4.2.2, PHP version: 5.2.11, URL: /~prehisto/cms/index.php?page=cms_catalogues&type=_edit_cata
logue&id=products&redirect=http%3A%2F%2F206.123.100.130%2F%7
E
prehisto%2Fsite%2Findex.php%3Fpage%3Dcatalogues%26type%3Dcat
e
gory%26id%3Dhome%26catalogue_name%3Dproducts)


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#57102
Avatar

I'm getting my wires crossed here, because there's another topic about this date.php file.

Could you try this possible fix please.

Attachment
» Download: date.php (4 Kb, 222 downloads so far)


The last error you reported is due to the date_old.php file. You can't leave renamed php files inside hook directories because it'll try and load it as a hook (like a plugin) and fail due to the incorrect filename.


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:
#57103
Avatar

Community saint

Deleting the date_old.php file fixed the problem in the 3 catalogues but the LINKS catalog continues to have a problem. Here is the stack trace:

An error has occurred

PHP NOTICE [8] Undefined offset: 2 in /home/prehisto/public_html/sources/hooks/modules/catalogue_fields/date.php on line 90 (version: 4.2.2, PHP version: 5.2.11, URL: /~prehisto/site/index.php?page=catalogues&type=category&id=links&catalogue_name=links)

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/prehisto/public_html/sources/failure.php'
Line'538'
Function'get_html_trace'
Args



File'/home/prehisto/public_html/sources/global2.php'
Line'807'
Function'_fatal_exit'
Args'PHP NOTICE [8] Undefined offset: 2 in /home/prehisto/public_html/sources/hooks/modules/catalogue_fields/date.php on line 90'




File'/home/prehisto/public_html/sources/failure.php'
Line'147'
Function'fatal_exit'
Args'PHP NOTICE [8] Undefined offset: 2 in /home/prehisto/public_html/sources/hooks/modules/catalogue_fields/date.php on line 90'




File'/home/prehisto/public_html/sources/global2.php'
Line'678'
Function'_ocportal_error_handler'
Args'notice'

8

'Undefined offset: 2'

'/home/prehisto/public_html/sources/hooks/modules/catalogue_fields/date.php'

90




File'/home/prehisto/public_html/sources/hooks/modules/catalogue_fields/date.php'
Line'90'
Function'ocportal_error_handler'
Args8

'Undefined offset: 2'

'/home/prehisto/public_html/sources/hooks/modules/catalogue_fields/date.php'

90

array ( 'ev' => '2003/4/19 0:00:00', 'bits' => array ( 0 => '2003/4/19', 1 => '0:00:00', ), 'date_bits' => array ( 0 => '2003/4/19', 1 => '12', 2 => '2009', ), 'time_bits' => array ( 0 => '0', 1 => '00:00', ), )




File'/home/prehisto/public_html/sources/catalogues.php'
Line'336'
Function'render_field_value'
Class'Hook_catalogue_field_date'
Type'->'
ObjectHook_catalogue_field_date::__set_state(array( ))
Args'2003/4/19 0:00:00'

'links'

4

NULL




File'/home/prehisto/public_html/sources/catalogues.php'
Line'165'
Function'get_catalogue_entry_map'
Argsarray ( 'id' => 2, 'c_name' => 'links', 'cc_id' => 3, 'ce_submitter' => 2, 'ce_add_date' => 1261959738, 'ce_edit_date' => NULL, 'ce_views' => 0, 'ce_views_prior' => 0, 'ce_validated' => 0, 'notes' => '', 'allow_rating' => 1, 'allow_comments' => 1, 'allow_trackbacks' => 1, 'ce_last_moved' => 1261959738, )

array ( 'c_name' => 'links', 'c_title' => 220, 'c_description' => 221, 'c_display_type' => 2, 'c_is_tree' => 1, 'c_notes' => '', 'c_add_date' => 1261029951, 'c_submit_points' => 0, 'c_ecommerce' => 0, 'c_send_view_reports' => 'never', )

'CATEGORY'

'links'

3

array ( 0 => array ( 'id' => 14, 'c_name' => 'links', 'cf_name' => 224, 'cf_description' => 225, 'cf_type' => 'short_trans', 'cf_order' => 0, 'cf_defines_order' => 1, 'cf_visible' => 1, 'cf_searchable' => 1, 'cf_default' => '', 'cf_required' => 1, 'cf_put_in_category' => 1, 'cf_put_in_search' => 1, ), 1 => array ( 'id' => 15, 'c_name' => 'links', 'cf_name' => 226, 'cf_description' => 227, 'cf_type' => 'url', 'cf_order' => 1, 'cf_defines_order' => 0, 'cf_visible' => 1, 'cf_searchable' => 1, 'cf_default' => '', 'cf_required' => 1, 'cf_put_in_category' => 0, 'cf_put_in_search' => 1, ), 2 => array ( 'id' => 16, 'c_name' => 'links', 'cf_name' => 228, 'cf_description' => 229, 'cf_type' => 'long_trans', 'cf_order' => 2, 'cf_defines_order' => 0, 'cf_visible' => 1, 'cf_searchable' => 1, 'cf_default' => '', 'cf_required' => 0, 'cf_put_in_category' => 1, 'cf_put_in_search' => 1, ), 3 => array ( 'id' => 42, 'c_name' => 'links', 'cf_name' => 2148, 'cf_description' => 2147, 'cf_type' => 'short_text', 'cf_order' => 3, 'cf_defines_order' => 0, 'cf_visible' => 1, 'cf_searchable' => 1, 'cf_default' => '', 'cf_required' => 1, 'cf_put_in_category' => 1, 'cf_put_in_search' => 1, ), 4 => array ( 'id' => 43, 'c_name' => 'links', 'cf_name' => 2150, 'cf_description' => 2149, 'cf_type' => 'date', 'cf_order' => 4, 'cf_defines_order' => 0, 'cf_visible' => 1, 'cf_searchable' => 1, 'cf_default' => '', 'cf_required' => 1, 'cf_put_in_category' => 1, 'cf_put_in_search' => 1, ), 5 => array ( 'id' => 45, 'c_name' => 'links', 'cf_name' => 2272, 'cf_description' => 2271, 'cf_type' => 'short_text', 'cf_order' => 5, 'cf_defines_order' => 0, 'cf_visible' => 1, 'cf_searchable' => 1, 'cf_default' => '', 'cf_required' => 1, 'cf_put_in_category' => 1, 'cf_put_in_search' => 1, ), )

NULL

false

false

0




File'/home/prehisto/public_html/site/pages/modules/catalogues.php'
Line'535'
Function'get_catalogue_category_entry_buildup'
Args3

'links'

array ( 'c_name' => 'links', 'c_title' => 220, 'c_description' => 221, 'c_display_type' => 2, 'c_is_tree' => 1, 'c_notes' => '', 'c_add_date' => 1261029951, 'c_submit_points' => 0, 'c_ecommerce' => 0, 'c_send_view_reports' => 'never', )

'CATEGORY'

'links'

30

0

NULL

3




File'/home/prehisto/public_html/site/pages/modules/catalogues.php'
Line'455'
Function'view_catalogue_category'
Class'Module_catalogues'
Type'->'
ObjectModule_catalogues::__set_state(array( ))
Args



File'/home/prehisto/public_html/sources/zones.php'
Line'331'
Function'run'
Class'Module_catalogues'
Type'->'
ObjectModule_catalogues::__set_state(array( ))
Args



File'/home/prehisto/public_html/sources/site.php'
Line'884'
Function'load_module_page'
Args'site/pages/modules/catalogues.php'

'catalogues'




File'/home/prehisto/public_html/sources/site.php'
Line'702'
Function'request_page'
Args'catalogues'

true




File'/home/prehisto/public_html/site/index.php'
Line'51'
Function'do_site'
Args


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#57105
Avatar

Let's try again. I think this will work now (the problem was/is that the date format in the CSV was not what ocPortal normally uses)…

Attachment
» Download: date.php (4 Kb, 228 downloads so far)


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:
#57106
Avatar

Community saint

Is it that my date format in the CSV file was not what ocPortal was expecting? …and next time if I changed my format it would work OK?

BTW what is the 'correct' date/time format for ocPortal? and is this what I should use in the future?

I will try your fix at the other end of my day. Thanks!


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#57107
Avatar

It's just that the date in the CSV uses "/" between date components and ocPortal uses "-".
But it probably came out of Excel or whatever you use, so I'm happy to change the code to support it (which is what I've done).


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:
#57112
Avatar

Community saint

I got a little further. I can access the Catalogue/links/ but when I go to edit entries I get this:

An error has occurred

PHP NOTICE [8] Undefined offset: 1 in /home/prehisto/public_html/sources/hooks/modules/catalogue_f
ields/date.php on line 126 (version: 4.2.2, PHP version: 5.2.11, URL: /~prehisto/cms/index.php?page=cms_catalogues&type=_edit_entr
y&id=2&catalogue_name=links&redirect=http%3A%2F%2F206.123.100
.130%2F%7Eprehisto%2Fsite%2Findex.php%3Fpage%3Dcatalogues%26t
ype%3Dentry%26id%3Dlinks%252Ffossil_news)

I did not include the stack trace because the forum said it was too long.


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#57120
Avatar

This should fix that.

Attachment
date.php
» Download: date.php (5 Kb, 223 downloads so far)





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:
#57132
Avatar

Community saint

Thank you Chris! That did fix that!


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#57191
Avatar

Well-settled

Thank you very much Chris, that helped me a lot as well!

Can I add a question since this is a CSV related topic?

I need to import around 20000 articles in various categories. Is there any chance for them to be automatically validated? It would take forever to open all these articles one by one and check Validated. :)
Back to the top
 
Posted
Rating:
#57194
Avatar

They should be automatically validated anyway if done from the admin account. Let us know if that's not the case.


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:
#57197
Avatar

Well-settled

Hmmm… I renamed the admin account to something else. Maybe that's the case, I'll switch it back to admin and let you know. :)

Trying to import things right now but I can't get past the proper tag syntax check. I.e. If there is an unclosed bold or italics tag I'll get an error like this.

"There is an error (There were unclosed tags) in your Comcode at line 1. "

Is there any chance to bypass this? I don't mind if articles get imported with an unclosed tag, but it's a major pain visually checking one by one all the articles and make sure everything is right…

And I suspect that this gives an error in nested tags as well, i.e.

Code

[u]text text[b]more text[/b][/u]
Back to the top
 
Posted
Rating:
#57198
Avatar

Well-settled

Ok, I renamed my username back to admin and they still don't import as validated.

On top of that, if there is a tag misplaced, things will get imported up to the entry with the error.

For example if I try to import 100 articles and there's a tag misplaced in #28 entry, it will import 28 entries with the last one named Internal Error.

Then I have to fix that, reedit the Excel file (actually Calc file since only Open Office will export working CSVs) and keep importing. After I validate each file one by one though. :(
Back to the top
 
Posted
Rating:
#57199
Avatar

Community saint

Chris said said

 Let us know if that's not the case.
I have imported 210 entries divided up in 25 categories. When I click on a category it opens up the entries (Links in my case) under the selected display type as I would expect them to. Then if I go to the MORE button the next screen shows the entry info but there is a big red lettered warning:

This entry has not yet been validated by our staff and thus we cannot accept any responsibility for it. You followed a direct link to get to it.
I too am interested in how to validated in a quick way.

My login as Admin is by use of another moniker, does this disable the ability to automatically validate entrys by admin?


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#57200
Avatar

Well-settled

Doesn't seem to help, I switched my nick back to "admin" and entries imported from CSV still need to be validated. :/

It should normally check if you're part of the "Administrators" usergroup and validate it on import but it doesn't. In theory that would be a good thing since it's good to check your data after it's been imported before they show on the website, but in real conditions when hundreds or thousands of entries are involved that's a real pain!  :ninja:

I'm sure Chris will get back to us soon with a fix. :)
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Expand