Yii Framework Forum: EDatePicker weirdness - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

EDatePicker weirdness Rate Topic: -----

#1 User is offline   imehesz 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 699
  • Joined: 13-June 09
  • Location:Jacksonville, FL

Posted 17 July 2009 - 06:50 AM

hello,

I'm using EDatePicker and encountered the following issue.
I have a search form which was originally built-in on my list view. (everything was working at this point)
I decided to move it out and use the renderPartial() method.

Under my dev environment (windows xp) everything is still working fine. However, when I put the app on my "production" env (linux), I got the following error and the whole script stops (of course).

Has anybody seen this before?

Description

Invalid argument supplied for foreach()
Source File

blahblahblah/blahblah/protected/extensions/jui/EDatePicker.php(546)

00534:            break;
00535:
00536:          case 'imagebutton':
00537:            if ($this->image === '') {
00538:                $this->image = $this->baseUrl.'/images/calendar.gif';
00539:            }
00540:            $options['showOn'] = "'" . $this->showOn . "'";
00541:            $options['buttonImage'] = "'" . $this->image . "'";
00542:            $options['buttonImageOnly'] = 'true';
00543:            break;
00544:      }
00545:
00546: foreach ($this->callbacks as $key=>$val) {
00547:          $options['callback_'.$key] = $key;
00548:      }
00549:
00550:      $encodedOptions = self::encode(array_merge($options, $this->options));
00551:     
00552:      foreach ($this->callbacks as $key=>$val) {
00553:          $encodedOptions = str_replace("callback_{$key}:{$key}", "{$key}: {$val}", $encodedOptions);
00554:      }
00555:
00556:      return $encodedOptions;
00557:    }
00558:



thanks,

--iM
0

#2 User is offline   imehesz 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 699
  • Joined: 13-June 09
  • Location:Jacksonville, FL

Posted 17 July 2009 - 07:22 AM

There can be only ONE!

so far I found out that only one EDatePicker can be on the page (I need two for a date range).

It's just weird that it works on Windows but not on Linux? Why? WHY?

keep looking :/
0

#3 User is offline   imehesz 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 699
  • Joined: 13-June 09
  • Location:Jacksonville, FL

Posted 17 July 2009 - 07:59 AM

I found this HACK, but it won't work for ppl who trying to use callbacks :(

http://www.yiiframew...55.html#msg9455

i
0

#4 User is offline   imehesz 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 699
  • Joined: 13-June 09
  • Location:Jacksonville, FL

Posted 17 July 2009 - 09:20 AM

alright,

it has NOTHING to do with the OS. It works fine after you comment those lines out, mentioned above.

OR

you can try to set :
error_reporting(E_WARNING);


NOT RECOMMENDED, but puts out the fire ...

i

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users