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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • (Resolved) Find Contacts Broken after upgrade to 4.2 (Joomla)
Pages: [1]

Author Topic: (Resolved) Find Contacts Broken after upgrade to 4.2 (Joomla)  (Read 2149 times)

digitalzen

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
(Resolved) Find Contacts Broken after upgrade to 4.2 (Joomla)
September 09, 2012, 04:32:41 pm
Hey guys,

I've encountered an error that seems like it might be related to a bug in 4.2 (I've done a bit of reading, and saw some references to something similar), but I'm not sure that's the issue, as my upgrade path was anything but normal.

In the process of moving my CiviCRM database from one hosting provider to another, I noticed my original CiviCRM version was 4.1.3, but on the new server, I installed 4.2. I figured it would be trouble to try to export tables from a 4.1.3 install and import them into 4.2, so I went ahead and upgraded on the old server first, including using the database update utility. I encountered a couple errors early in the upgrade process (I believe they were all related to 4.1.4 betas, but didn't take good notes). I skipped over the errors (I think there were 3 total) and the rest of the database update went smooth as silk.

I then went to check out CiviCRM in my Joomla back end. This is where I first noticed that Search>Find Contacts (empty search, or even a named search) returns the following error:

Quote
Sorry but we are not able to provide this at the moment.
DB Error: no such field

Return to home page.

I believe that this functionality worked fine in 4.1.3 prior to the upgrade, but can't confirm for sure.

So despite the problem, I decided to soldier on and import the tables into the MySQL database on the new server, both to see if it was a server related problem and in hopes that it might just magically go away. No luck.  :P

(I am, in no way, a MySQL pro, so please bear with me here)

In case it's helpful, here are specs for old server and new server:

Old Server -
Joomla 2.5.4
CiviCRM 4.1.3, upgraded to 4.2 as described above
PHP 5.3.13
MySQL 5.1.56-log

New Server -
Joomla 2.5.6
CiviCRM 4.2 (baseline install)
PHP 5.2.17
MySQL 5.1.63-cll

The other thing I noticed is that the CiviCRM icon appears in the Joomla dashboard, but not in the Components menu. Not sure if this is related, but I'd like to get this fixed too, if possible.

Any help or guidance would be greatly appreciated.

Chris
« Last Edit: September 24, 2012, 11:08:32 pm by digitalzen »

digitalzen

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
Re: Find Contacts Broken after upgrade to 4.2 (Joomla)
September 19, 2012, 04:28:24 pm
Has anybody else run into this or something similar? Any advice?

I should note that the Find Contacts empty search function broke on the old server after the upgrade as well.

Any and all help greatly appreciated.

Chris

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: Find Contacts Broken after upgrade to 4.2 (Joomla)
September 19, 2012, 11:24:27 pm

can u check your civicrm log file (under the media directory) and see what field it is complaining about

thanx

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

digitalzen

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
Re: Find Contacts Broken after upgrade to 4.2 (Joomla)
September 20, 2012, 12:00:38 am
Hey Lobo,

Thanks for the reply. Here's the log from an attempt I just ran:

Quote
Sep 19 23:52:45  [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] =>
SELECT entity_id1, entity_id2 FROM civicrm_prevnext_cache
WHERE cacheKey LIKE '%civicrm search df9bfe2724e97d467eb6dee130dac691_1065%'  AND is_selected = 1  AND entity_table = 'civicrm_contact' [nativecode=1054 ** Unknown column 'is_selected' in 'where clause']
    [type] => DB_Error
    [user_info] =>
SELECT entity_id1, entity_id2 FROM civicrm_prevnext_cache
WHERE cacheKey LIKE '%civicrm search df9bfe2724e97d467eb6dee130dac691_1065%'  AND is_selected = 1  AND entity_table = 'civicrm_contact' [nativecode=1054 ** Unknown column 'is_selected' in 'where clause']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="
SELECT entity_id1, entity_id2 FROM civicrm_prevnext_cache
WHERE cacheKey LIKE '%civicrm search df9bfe2724e97d467eb6dee130dac691_1065%'  AND is_selected = 1  AND entity_table = 'civicrm_contact' [nativecode=1054 ** Unknown column 'is_selected' in 'where clause']"]
)


Sep 19 23:52:45  [info] $backTrace = (docroot)/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php, backtrace, 196
, handle,
(docroot)/administrator/components/com_civicrm/civicrm/packages/PEAR.php, call_user_func, 931
(docroot)/public_html/administrator/components/com_civicrm/civicrm/packages/DB.php, PEAR_Error, 968
(docroot)/administrator/components/com_civicrm/civicrm/packages/PEAR.php, DB_Error, 564
(docroot)/administrator/components/com_civicrm/civicrm/packages/DB/common.php, raiseError, 1903
(docroot)/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php, raiseError, 898
(docroot)/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php, mysqlRaiseError, 327
(docroot)/administrator/components/com_civicrm/civicrm/packages/DB/common.php, simpleQuery, 1216
(docroot)/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php, query, 2421
(docroot)/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php, _query, 1613
(docroot)/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php, query, 155
(docroot)/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php, query, 888
(docroot)/administrator/components/com_civicrm/civicrm/CRM/Core/BAO/PrevNextCache.php, executeQuery, 368
(docroot)/administrator/components/com_civicrm/civicrm/CRM/Contact/Form/Search.php, getSelection, 496
(docroot)/administrator/components/com_civicrm/civicrm/CRM/Contact/Form/Search/Basic.php, buildQuickForm, 119
(docroot)/administrator/components/com_civicrm/civicrm/CRM/Core/Form.php, buildQuickForm, 350
(docroot)/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php, buildForm, 93
(docroot)/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php, perform, 203
(docroot)/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Page.php, handle, 103
(docroot)/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php, handle, 289
(docroot)/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php, run, 228
(docroot)/administrator/components/com_civicrm/admin.civicrm.php, invoke, 87
(docroot)/administrator/components/com_civicrm/admin.civicrm.php, civicrm_invoke, 40
(docroot)/libraries/joomla/application/component/helper.php, require_once, 383
(docroot)/libraries/joomla/application/component/helper.php, executeComponent, 351
(docroot)/administrator/includes/application.php, renderComponent, 153
(docroot)/administrator/index.php, dispatch, 46

[/quote]

I used (docroot) to obscure the actual path through 'public_html'.

Thanks!
Chris

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: Find Contacts Broken after upgrade to 4.2 (Joomla)
September 20, 2012, 03:48:44 am
Chris,

The error indicates that "is_selected" column is missing in civicrm_prevnext_cache table.

Very possible that this is a result of doings skips during upgrade as you mentioned.
Quote
I skipped over the errors (I think there were 3 total) and the rest of the database update went smooth as silk.

Try for a clean upgrade or investigate on whats causing you not to upgrade cleanly.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

digitalzen

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
Re: Find Contacts Broken after upgrade to 4.2 (Joomla)
September 20, 2012, 03:52:47 pm
Thanks Deepak.

Would it be possible to go in through PHP MyAdmin and just add the column to the table? I've got a working build on my localhost that I could compare to, so I would know where to put it.

Chris

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: Find Contacts Broken after upgrade to 4.2 (Joomla)
September 21, 2012, 01:59:58 am
Possible but not recommended as you may hit other errors later.

The other way could be schema correction - http://wiki.civicrm.org/confluence/display/CRMDOC42/Ensuring+Schema+Integrity+on+Upgrades. The only thing is now you do for v4.2 without proceeding to upgrades.

Please note this will only correct the structure, and not any data loss that might have occurred.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

digitalzen

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
Re: Find Contacts Broken after upgrade to 4.2 (Joomla)
September 21, 2012, 10:51:49 am
Just thinking out loud here... as I mentioned, I have a working install on my localhost. What if I were to take a full data dump from the server, import it into an empty, working localhost database, then move the tables (after verifying them) to the server?

The problem I have is that I don't have a great backup of the database, pre-upgrade. I've got a decent one, but I'm anxious about trying to use it.

digitalzen

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
RESOLVED: Find Contacts Broken after upgrade to 4.2 (Joomla)
September 24, 2012, 11:07:58 pm
Just to close the loop here, I managed to fix everything. Deepak, I really appreciated your advice and guidance, but ultimately took the path of hand-editing the MySQL tables, fully aware of the risk I was taking. As it turns out, there was surprisingly little that needed modification. There were two tables missing, which I imported from my successful localhost install (since they would be empty anyway), and then had to add and edit a couple of columns in three other tables.

I'm aware there may be other latent issues buried in other tables, but I feel confident I can hunt them down and fix them as needed. I may even just sweep through the whole doggone thing, table by table. Lobo gave me the big tip-off on how to identify problem locations from the Log, and while I'm still a MySQL n00b, I'm learning very fast. It's interesting to see how this stuff operates behind the scenes, anyway. Who knows, maybe someday my skills will be good enough that I might be able to contribute to the development effort.  :D

Anyhow, thanks for the help guys!

Chris

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • (Resolved) Find Contacts Broken after upgrade to 4.2 (Joomla)

This forum was archived on 2017-11-26.