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 »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Views, events, civicrm_loc_block.name error
Pages: [1]

Author Topic: Views, events, civicrm_loc_block.name error  (Read 1892 times)

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Views, events, civicrm_loc_block.name error
July 29, 2009, 06:58:09 pm
In views2, when I select as a field the "Location Name" I get an error saying no such column exists.  I checked my tables and indeed, no column "name" exists in the civicrm_loc_block table.

However, civicrm.views.inc calls for this column, at line 1263. 

I am using drupal 6.13, Civi 2.2.6.  is this a change in 2.2.7?  Or is something wrong with my table?

Thanks,
Maria

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Views, events, civicrm_loc_block.name error
July 30, 2009, 01:51:49 am
There is no "name" column in civicrm_loc_block table, can you file an issue for this. We will fix it for 2.2.8

Kurund
Found this reply helpful? Support CiviCRM

jalama

  • I post frequently
  • ***
  • Posts: 176
  • Karma: 22
    • Rooty Hollow LLC
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6 and 7
  • MySQL version: 5.1
  • PHP version: 5.2.5 and 5.3
Re: Views, events, civicrm_loc_block.name error
July 31, 2009, 07:50:19 am
This patch added the correct name field from the Address table, you will find what you want under CiviCRM Address: Address Name.

http://issues.civicrm.org/jira/browse/CRM-4384


The patch should have deleted the reference to the loc block table (oops my bad :))
http://www.rootyhollow.com

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: Views, events, civicrm_loc_block.name error
August 03, 2009, 12:07:09 pm
@kurund: done.

@ jalama: I applied the patch, it now pulls the field, but I have two sets of questions:
1.  I have no version number in my civicrm.views.inc file.  I found the appropriate area for your patch (a few lines below 695).  Is the version number listed in the file?  Not a big deal, but sometimes in convenient for patching.  Is there a recent version of civicrm.views.inc that i can use so I am using the most updated version?  And will it work with 2.2.7 (not on 8 yet)?

2.  The patch works, but it pulls an empty field.  In other words, it does not appear that when an event location is created, there is no field for "Address Name" to be filled in.  As a matter of fact, this column is completely empty.  The field doesn't even appear in the actual address area for an individual.  Is this field new?  I couldn't find anything in the forums for it.

To solve this, I simply added the first line address into the file.  I don't know how to create patches (besides, it would be at the wrong lines), but here is my code:

Code: [Select]
    //Address First Line
    $data['civicrm_address']['street_address'] = array(
                                             'title' => t('Street Address'),
                                             'help' => t('First line of the address'),
                                             'field' => array(
                                                              'handler' => 'views_handler_field',
                                                              'click sortable' => TRUE,
                                                              ),
 
                                             'argument' => array(
                                                                 'handler' => 'views_handler_argument',
                                                                 ),

                                             'filter' => array(
                                                               'handler' => 'views_handler_filter_string',
                                                               ),

                                             'sort' => array(
                                                             'handler' => 'views_handler_sort',
                                                             ),
                                             );

Thanks for your patch!
m


Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Views, events, civicrm_loc_block.name error
August 03, 2009, 08:01:32 pm
Quote
2.  The patch works, but it pulls an empty field.
I guess Address Name is empty because you don't have value for it.

Quote
In other words, it does not appear that when an event location is created, there is no field for "Address Name" to be filled in.  As a matter of fact, this column is completely empty.  The field doesn't even appear in the actual address area for an individual.  Is this field new?  I couldn't find anything in the forums for it.
You need to enable "Address Name" in Global Settings>> Address Settings - Address Editing section. Check http://sandbox.civicrm.org/civicrm/admin/setting/preferences/address?reset=1

HTh

Kurund
Found this reply helpful? Support CiviCRM

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: Views, events, civicrm_loc_block.name error
August 04, 2009, 09:16:05 pm
yup, helps.  thanks.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Views, events, civicrm_loc_block.name error

This forum was archived on 2017-11-26.