Yii Framework Forum: Error in using zii.widgets.CPortlet - Yii Framework Forum

Jump to content

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

Error in using zii.widgets.CPortlet include(Portlet.php): failed to open stream: No such file or directory Rate Topic: -----

#1 User is offline   nmaybar 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 08-November 11

  Posted 10 August 2012 - 11:09 AM

hi all
I am new to yii, I am trying to use cportlet as descriped in Creating User Menu Portlet but I get an error message "include(Portlet.php): failed to open stream: No such file or directory"
can anyone help me to get it works.
thanks in advanced.
Best Reagards,
nmaybar@gmail.com
0

#2 User is offline   alirz23 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,082
  • Joined: 08-August 12
  • Location:Durban, South Africa

Posted 10 August 2012 - 11:19 AM

can you post you code please
0

#3 User is offline   Boaz 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 367
  • Joined: 23-January 11

Posted 10 August 2012 - 12:37 PM

View Postnmaybar, on 10 August 2012 - 11:09 AM, said:

hi all
I am new to yii, I am trying to use cportlet as descriped in Creating User Menu Portlet but I get an error message "include(Portlet.php): failed to open stream: No such file or directory"
can anyone help me to get it works.
thanks in advanced.



Your class should extend CPortlet, not Portlet.
Therapeutic PHP sessions My LinkedIn Profile
0

#4 User is offline   nmaybar 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 12
  • Joined: 08-November 11

  Posted 11 August 2012 - 10:59 AM

View PostBoaz, on 10 August 2012 - 12:37 PM, said:

Your class should extend CPortlet, not Portlet.

Thannks Boaz
you are right, that worked.but I did not understand,if you check the Creating Login Portlet you will find that it extends portlet not CPortlet but in Creating User Menu Portlet it extends the CPortlet not Portlet.So what is the difference?
Thanks again for all of you :).
Best Reagards,
nmaybar@gmail.com
0

#5 User is offline   Boaz 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 367
  • Joined: 23-January 11

Posted 11 August 2012 - 11:17 AM

View Postnmaybar, on 11 August 2012 - 10:59 AM, said:

Thannks Boaz
you are right, that worked.but I did not understand,if you check the Creating Login Portlet you will find that it extends portlet not CPortlet but in Creating User Menu Portlet it extends the CPortlet not Portlet.So what is the difference?
Thanks again for all of you :).


Right. I thought there was a bug in the docs (could happen) but then I noticed that the docs are for Yii v1.0. There's typically two strands of documentation - for v1.0 and for v1.1. You need to read (probably) only the docs for v1.1.
For usage of CPortlet in v1.1 see this page.
Therapeutic PHP sessions My LinkedIn Profile
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