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 »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • CiviCRM config_backend Issues
Pages: 1 [2]

Author Topic: CiviCRM config_backend Issues  (Read 3704 times)

btc97

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
  • CiviCRM version: 4.5.4
  • CMS version: Drupal
  • MySQL version: 5.5.37
  • PHP version: 5.3.3
Re: CiviCRM config_backend Issues
March 28, 2012, 07:15:43 pm
In case someone faces the same issue, my problem which ate up almost 16 hours of my time, turned out to be the name of the old database user being dumped into the new database. Showed up in lots of places actually, with lines in the sql file starting e.g. /*!50003 CREATE*/ /*!50017 DEFINER=`username`. Easily fixed by just doing a text replace in the sql file!

-kf-

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.1.3
  • CMS version: D7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: CiviCRM config_backend Issues
August 15, 2012, 07:23:55 am
On a civicrm 4.1.3 instance, I encounter the same issue -- here's my dump from PEAR.php

DB_Error Object SELECT * FROM civicrm_contact_type_ru_RU WHERE ( civicrm_contact_type_ru_RU.name = 'Individual' ) nativecode=1356 View 'civicrm_contact_type_ru_RU' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

after a mysql import, it appears that some privileges or views are invalid, I'm going to troubleshoot and post back my results, as this is a persistant and reproducible problem, which has kept me from deploying using db dumps -- I've had to invoke API for setting / changing most of the system-specific requirements instead of merely deploying a db from staging to production.

My fix was granting all on the tables to the db user again, and it seems to work now.
« Last Edit: August 15, 2012, 07:25:41 am by -kf- »

phunter

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
  • CiviCRM version: Latest
  • CMS version: Drupal 7
Re: CiviCRM config_backend Issues
August 15, 2012, 07:36:58 am
I believe this is another issue, based on the error, but the message does give some clues as to the problem.
The database you are importing would have had a database user in the original mysql database that now does not exist in the new database.

My suggestion for migrating multi-lang sites would be to create a fresh install, add the required languages then import the database without the views. I will not bore you with the technical details of why to do it this way beside to say this is the simplest solution.

This should solve the problem. I can't recall how to export without view at a command line level but if you use Mysql workbench then the option is just a flag to tick / un-tick.

There could also be other issues here but this is where I would start, 75% sure this is the problem.

Paul

ehanuise

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 2
  • CiviCRM version: 4.1.3
  • CMS version: Drupal 7.17
  • MySQL version: 5.1.49-3
  • PHP version: 5.3.3-7+squeeze3
Re: CiviCRM config_backend Issues
September 06, 2012, 07:33:38 am
I'm having a similar issue here :
- I need to set up a dev instance of our server
- I migrated the codebase and DB, emptied the cached files and cache tables, as well as the domain table
- It's a multilingual instance
- I get PEAR out of memory errors when trying to reach the civicrm part

I also had permissions problems on views due to the initiator not having the same name, which were solved by a grant all privileges and refresh (not much of an issue on a dev server, but would be a problem for a production machine however.)

yet, the memory errors remained.

I then added this line
Code: [Select]
die (sprintf(PEAR_Error::toString ()));in /sites/all/modules/civicrm/packages/PEAR.php in the function that was failing and got this :

[db_error: message="DB Error: no such field"
code=-19
mode=callback
callback=CRM_Core_Error::handle prefix=""
info=" SELECT option_value.id as id, option_value.label as label, option_value.value as value, option_value.name as name, option_value.description as description, option_value.weight as weight, option_value.is_active as is_active, option_value.is_default as is_default FROM civicrm_option_value as option_value, civicrm_option_group as option_group WHERE option_group.id = option_value.option_group_id AND option_value.is_active = 1 AND option_group.name = 'languages' ORDER BY weight
[nativecode=1054 ** Unknown column 'option_value.label' in 'field list']"]

So if I read this correctly, it's looking for 'label' in the option_value table.
I have label_fr_FR, label_nl_NL and label_en_GB but no 'label' in that table
And I have views civicrm_option_value_fr_FR, civicrm_option_value_nl_NL, and civicrm_option_value_en_GB which do have a 'label' column

not being a programmer, all I can do here is guess something went wrong because of multilingual   ???

So the big question is : where do I fix it and how come it works in the original environment ?
« Last Edit: September 06, 2012, 07:35:15 am by ehanuise »

ehanuise

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 2
  • CiviCRM version: 4.1.3
  • CMS version: Drupal 7.17
  • MySQL version: 5.1.49-3
  • PHP version: 5.3.3-7+squeeze3
Re: CiviCRM config_backend Issues
September 11, 2012, 02:26:39 am
OK, I could fix it.
I copied the contents of the civicrm_domain table from the production server onto the migrated dev server
then I called civicrm/admin/setting/updateConfigBackend&reset=1 and all was back to working state.

Not sure whether the whole record needs be copied or if only the 'locales' column is relevant, but still, migration now completed :)


Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • CiviCRM config_backend Issues

This forum was archived on 2017-11-26.