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 CiviEvent (Moderator: Yashodha Chaku) »
  • Events image problem (weird)
Pages: [1]

Author Topic: Events image problem (weird)  (Read 1302 times)

nui

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 3.2
  • CMS version: drupal 6.x
  • MySQL version: 5
  • PHP version: 5
Events image problem (weird)
October 04, 2011, 02:27:43 am
This may have something to do with the server as we migrated a couple of months ago, and did not notice this bug before.

We add images to events, so that an image can be displayed when listing all the events. But we do not show the image on the actual event detail page.
Now when we upload an image, "sometimes" the thumbnail image appears squashed in the admin page (see first attachment) compared to what it should look like. When this happens we know that we will see an error on the event detail page
warning: getimagesize() [function.getimagesize]: Filename cannot be empty in /var/www/html/namehidden.co.uk/sites/all/modules/civicrm/CRM/Core/BAO/CustomGroup.php on line 564.

the code on that line is
         list( $imageWidth, $imageHeight ) = getimagesize( $path );
the problem is that $path is empty (i tried echo "path=".$path;)

here is the weird thing.
this only seems to happen if I upload the same image to another event.
the new event will show the correct image, but the event that previously had the same image is now buggered.
unfortunately this happens quite a bit on this site, because they load spanish version of the same event for spanish speakers.

any ideas?

p.s. I know that i could upload a different image, but would prefer a fix rather than a workaround.

« Last Edit: October 04, 2011, 02:42:52 am by nui »

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: Events image problem (weird)
October 04, 2011, 03:34:40 am
Can you check if you are able to replicate this on http://drupal.demo.civicrm.org, if you are able to replicate please file a bug report in issue tracker.

But I think this might be already fixed in latest release ( there has been lot of changes since 3.2 release )

Looks like you are on v3.2, is it possible to upgrade to latest stable? If yes I would recommend that.

Kurund
Found this reply helpful? Support CiviCRM

Rajan Mayekar

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 20
    • Rajan's Blogs
Re: Events image problem (weird)
October 04, 2011, 04:15:25 am
I suspect a small bug
can u try following patch
Code: [Select]
Index: CRM/Core/BAO/CustomGroup.php
===================================================================
--- CRM/Core/BAO/CustomGroup.php (revision 35693)
+++ CRM/Core/BAO/CustomGroup.php (working copy)
@@ -555,7 +555,7 @@
                                                 $entityId = CRM_Core_DAO::getFieldValue( 'CRM_Core_DAO_EntityFile',
                                                                                          $fileDAO->id,
                                                                                          'entity_id',
-                                                                                         'id' );
+                                                                                         'file_id' );
                                                 require_once 'CRM/Core/BAO/File.php';


Let me know, is it working or not?

nui

  • I’m new here
  • *
  • Posts: 6
  • Karma: 0
  • CiviCRM version: 3.2
  • CMS version: drupal 6.x
  • MySQL version: 5
  • PHP version: 5
Re: Events image problem (weird)
October 04, 2011, 06:26:34 am
Hi Rajan,
that fix did indeed work for me. No more error messages.
(not sure how to do patches, but could see manually what to do)

many thanks

Kurund , we have quite a bit of fettling to get civicrm to work with our custom multi language fixes, so we cannot upgrade.
a word of advice if you have multi language - skip civicrm.
« Last Edit: October 04, 2011, 06:28:18 am by nui »

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: Events image problem (weird)
October 04, 2011, 06:45:43 am

nui:

can u elaborate a bit more on the amount and type of fettling you had to do for civicrm with multi language?

as u r aware most of our user base is mono-lingual, so multi-language gets the short end of the stick. This also means that folks for whom multi-lingual is critical need to participate and help a lot more to get civi multi-lingual in a more stable and reliable state :)

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Events image problem (weird)

This forum was archived on 2017-11-26.