CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • civicrm_custom_field error
Pages: [1]

Author Topic: civicrm_custom_field error  (Read 1490 times)

palmquist

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 2
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.36-log
  • PHP version: 5.4.24
civicrm_custom_field error
April 15, 2010, 11:35:58 am
It became necessary for me to backup and re-install Drupal/CiviCRM (in the exact same location).  Eventually I could get CiviCRM working again and I can see my data (in some places), but the following error frequently appears:
======
Sorry. A non-recoverable error has occurred.

DB Error: no such field

Database Error Code: Unknown column 'civicrm_custom_field.date_format' in 'field list', 1054

Return to home page.
=======
Browsing civicrm_custom_field in phpMyAdmin I don't see any reference to date_format (which I guess is indicated by the above error message).  Did I somehow lose this column when I restored from the backup?

Thanks in advance for any suggestions you can offer.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: civicrm_custom_field error
April 15, 2010, 03:13:52 pm

seems like your backup and code version do not match. You might want to try to upgrade and see if that works, i.e. run the url

q=civicrm/upgrade&reset=1

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

palmquist

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 2
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.36-log
  • PHP version: 5.4.24
Re: civicrm_custom_field error
April 16, 2010, 12:11:35 pm
When I tried .../civicrm/upgrade?reset=1 the following error appeared:

Sorry. A non-recoverable error has occurred.

Database check failed - it looks like you have already upgraded to the latest version (v3.1.3) of the database. OR If you think this message is wrong, it is very likely that this a partially upgraded database and you will need to reload the correct database from backup on which upgrade was never tried.

palmquist

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 2
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.36-log
  • PHP version: 5.4.24
Re: civicrm_custom_field error
April 17, 2010, 10:43:48 am
Looking at a backup copy of the database, I saw that civicrm_domain.version was "3.0.2" in the backup but that the active database had civicrm_domain.version = "3.1.alpha1.upgrade".  So I changed civicrm_domain.version in the active database to "3.0.2", along with trying some other things such as deleting Config.IDS.ini, setting config_backend = NULL, and truncating civicrm_cache and civicrm_menu.  I also reloaded the 3.0.2 code.

As a result, the previous errors disappear and many parts of CiviCRM now seem to be working properly.  However, when I try to access Contributions, the following "unrecoverable" error appears:

QuickForm Error: nonexistent html element
Error Details:
Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -3
    [message] => QuickForm Error: nonexistent html element
    [mode] => 16
    [debug_info] => Element 'custom_7_from' does not exist in HTML_QuickForm::addRule()
    [type] => HTML_QuickForm_Error
    [user_info] => Element 'custom_7_from' does not exist in HTML_QuickForm::addRule()
    [to_string] => [html_quickform_error: message="nonexistent html element" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="QuickForm Error: " info="Element 'custom_7_from' does not exist in HTML_QuickForm::addRule()"]
)

I also ran .../civicrm/upgrade?reset=1 again but it just reports "Your database has already been upgraded to CiviCRM 3.0.2". 
But when I return to CiviCRM Home it still says "Powered by CiviCRM 3.1.3" at the bottom.

I am wondering if I should just start over from scratch, but with some 5000 entries already in the database I would prefer not to do so.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: civicrm_custom_field error
April 17, 2010, 10:57:41 am

seems like there is a discrepancy between your DB and code. You might want to do a clean install of 3.1.4 and compare the db schema's. If you are not familiar with php/mysql, your best bet would be to hire someone from http://civicrm.org/professional/ to help sort out this mess

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

palmquist

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 2
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.36-log
  • PHP version: 5.4.24
Re: civicrm_custom_field error
April 19, 2010, 04:16:49 am
After making numerous attempts to solve this problem, I made a clean install of 3.0.2, and used phpMyAdmin to import data from a .sql backup file (which had been exported from the last working 3.0.2 install, so that is why this is the version I chose to install).  After going through other precautionary measures, most CiviCRM functions seemed to be working, but attempting to access Contributions still gave me the QuickForm Error which referenced 'custom_7_from' (which did not appear to be a valid field from anywhere in the database). 
Eventually I tried upgrading to 3.1.4, which was successful on the first attempt (to my surprise)!
Seeing that contributions (and other functions) now work properly, I tried to move on to the task I was working on when CiviCRM was last functioning properly, which was Credit Card donations.  This seemed to work properly, except that I received a message stating that my smtp needed to be configured (which I had done for the old install).  After re-entering the smtp information, the following messages appeared:

    * warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home1/glorifyj/public_html/resources/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php on line 130.
    * warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home1/glorifyj/public_html/resources/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php on line 130.
    * warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home1/glorifyj/public_html/resources/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php on line 130.
    * warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home1/glorifyj/public_html/resources/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php on line 130.
    * warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home1/glorifyj/public_html/resources/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php on line 130.
    * warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home1/glorifyj/public_html/resources/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php on line 130.
    * warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home1/glorifyj/public_html/resources/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php on line 130.
    * warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home1/glorifyj/public_html/resources/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php on line 130.
    * warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home1/glorifyj/public_html/resources/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php on line 130.
    * warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home1/glorifyj/public_html/resources/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php on line 134.


I am hoping that the above messages are unrelated to my previous database problems.

palmquist

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 2
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.36-log
  • PHP version: 5.4.24
Re: civicrm_custom_field error
April 19, 2010, 04:27:00 am
I tried setting config_backend to NULL (seeing that this was suggested in other threads relating to the above warning messages) but the same warning messages continue to appear.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • civicrm_custom_field error

This forum was archived on 2017-11-26.