Comments (42)
Is your CakePHP app install on / or the WWW root? If not, you will have to manually change the path of the Javascript ... I have submitted a pull request that addresses this problem and allows it to run on any location on WWW, even outside of root.
from cakephp-full-calendar-plugin.
I made the changes in View/FullCalendar/index.ctp and webroot/js/ready.js as they appear in : srs81@fecfbf8
But nothing.. when i make a debug($data) in eventsController and it doesn't have anything.. (null) could that be the problem?
And Thanks for answer..!
from cakephp-full-calendar-plugin.
I comment the line of $conditions in Events Controller (Feed function, line 83) and i get the json but still don't appear anything in the calendar.
This is the json:
[{"id":"1","title":"Test","start":"2012-03-29 12:19:00","end":"2012-03-29 12:19:00","allDay":true,"url":"/full_calendar/events/view/1","details":"Test","className":"Red"}]
from cakephp-full-calendar-plugin.
What's your URL path? Its showing it request: /full_calendar/events/view/1 - is your app installed on the / path? Can you go to http://localhost/full_calendar/events/view/1 - what does that say?
from cakephp-full-calendar-plugin.
Hey, sorry I see what the problem is. I forgot to make one change to the controller that fixes the problem - if you look at my updated code, I think that should solve your problem.
from cakephp-full-calendar-plugin.
Hey.. thanks.. i will try it.. i end up changing your code to create de json file, first i use the routes.php adding the Router::parseExtensions('json');
And then i made a function to create the json, and it work... if you need the code just tell me.
from cakephp-full-calendar-plugin.
Hmmm, that's cool, I think the controller change will be quicker and easier - its a one-line change, but if you were able to change the routes and JSON output, that's great too!
from cakephp-full-calendar-plugin.
I have the same problem. It works fine when input /full_calendar/events/view/1, but in the /full_calendar page, there is no any events.
Could you tell me where should be changed // you said "its a one-line change".
I use Cakephp 2.0.
Change code: srs81@fecfbf8
But still get error: full_calendar/events/feed/1
Notice (8): Undefined index: start [APP\Plugin\FullCalendar\Controller\EventsController.php, line 84]
Notice (8): Undefined index: end [APP\Plugin\FullCalendar\Controller\EventsController.php, line 84]
Notice (8): Undefined variable: data [APP\Plugin\FullCalendar\Controller\EventsController.php, line 105] Fatal error: Call to undefined method View::fetch() in D:\Websites\ie\project27\new\CakePHP\app\View\Layouts\ajax.ctp on line 19
Thanks
from cakephp-full-calendar-plugin.
Are you using the updated version of the Full Calendar plugin?
from cakephp-full-calendar-plugin.
I downloaded it from master branch yesterday,is it the right one?
Thanks
from cakephp-full-calendar-plugin.
Hey,
I am also facing the same issue for 1.0 version on cake 1.3
Have implemented your latest fixes also srs81@fecfbf8
What else can be wrong?
from cakephp-full-calendar-plugin.
Ah sorry unfortunately I don't know. :/
from cakephp-full-calendar-plugin.
Can anyone please give me the link to fixed code for the event to be displayed in the calendar.
Your help would be greatly appreciated.
Thanks
from cakephp-full-calendar-plugin.
I change the routes.php to create the json file and i made a function inside the plugin(EventsController), i don't write to the database 'cause i just need to display some dates that are from another table called "vacations" and this is the part where i create the json file inside eventsController
$vacations = array();
foreach ($datas as $data) {
array_push($vacations,array(
'id' => $data['Vacation']['id'],
'title' => $data['Employee']['name'],
'start' => $data['Vacation']['date_in'],
'end' => $data['Vacation']['date_out'],
'url'=> '/employees/viewEmployee/'.$data['Employee']['id']
));
}
$this->set('vacations', $vacations);
from cakephp-full-calendar-plugin.
if you use croogo use this function. took me 2 hour to fix this
function feed() {
$conditions = array('conditions' => array('start >=' => date('Y-m-d h:i:s',$this->params['url']['start']), 'start <=' => date('Y-m-d h:i:s',$this->params['url']['end'])));
$events = $this->Event->find('all', $conditions);
foreach($events as $event) {
if($event['Event']['all_day'] == 1) {
$allday = true;
$end = $event['Event']['start'];
} else {
$allday = false;
$end = $event['Event']['end'];
}
$data[] = array(
'id' => $event['Event']['id'],
'title'=>$event['Event']['title'],
'start'=>$event['Event']['start'],
'end' => $end,
'allDay' => $allday,
'url' => '/full_calendar/events/view/'.$event['Event']['id'],
'details' => $event['Event']['details'],
'className' => $event['EventType']['color']
);
}
Configure::write('debug', 0);
$this->autoRender = false;
$this->autoLayout = false;
$this->header('Content-Type: application/json');
echo json_encode($data);
}
from cakephp-full-calendar-plugin.
Thanks Mahmood-R
I coped your code, and now it works. :)
from cakephp-full-calendar-plugin.
hi! everyone, I'm using Cakephp version 2.2.2, and i have the same problem
It don't show any event..
Notice (8): Undefined index: start [APP/Plugin/FullCalendar/Controller/EventsController.php, line 83]
Notice (8): Undefined index: end [APP/Plugin/FullCalendar/Controller/EventsController.php, line 83]
Notice (8): Undefined variable: data [APP/Plugin/FullCalendar/Controller/EventsController.php, line 104]
null
I can see localhost/full_calendar/events/view/1, add, edit. but It don't show any event.
what can i do?
Thanks.
from cakephp-full-calendar-plugin.
Hey @G00z you should check the JSON output.. and check if it works.. use develop tools in chrome, firefox or safari..
from cakephp-full-calendar-plugin.
Hi Joshdcid, Thanks for answer, im using Firefox and chrome, now i solve the error 404, but when i go to full_calendar/event/feed/ i have the error:
Notice (8): Undefined variable: data [APP\Plugin\FullCalendar\Controller\EventsController.php, line 108]
null
and i can't see my events on calendar in full_calendar/index.ctp
I tried in cake 1.3 , 2.1.0 beta and 2.2.2
from cakephp-full-calendar-plugin.
And yes, if i comment the line 83 in EventsController, the JSON output is:
[{"id":"1","title":"Actividad 1","start":"2013-05-12 01:33:00","end":"2013-05-16 01:33:00","allDay":false,"url":"/admin/full_calendar/events/view/1","details":"QWERTY","className":"Green"}]
from cakephp-full-calendar-plugin.
And you see it in your calendar?
from cakephp-full-calendar-plugin.
No :( , using Firebug in the view full_calendar/index.ctp i can see:
GET feed?start=136776.... Status OK, can i see my events OK only in FIREBUG, but the calendar don't show my events
Thanks for help me :)
from cakephp-full-calendar-plugin.
Look for the ready.js in Plugins/FullCalendar/webroot/js and look for the line:
events: '/full_calendar/events/vacations.json', - put here your path for the JSON and see if it works..
from cakephp-full-calendar-plugin.
Thaks for answer me, i did, but not works :(
from cakephp-full-calendar-plugin.
The json_encode($data) output is: null
Also try with $this->header('Content-Type: application/json'); but the same output null
from cakephp-full-calendar-plugin.
Thanks, this is my array:
$data[] = array(
'id' => $event['Event']['id'],
'title'=>$event['Event']['title'],
'start'=>$event['Event']['start'],
'end' => $end,
'allDay' => $allday,
'url' => '/admin/full_calendar/events/view/'.$event['Event']['id'],
'details' => $event['Event']['details'],
'className' => $event['EventType']['color']
);
$this->set("json",json_encode($data));
from cakephp-full-calendar-plugin.
Ok, thanks, here my function
< With this function i don't have the ERROR undefined var $data > but in full_calendar/events/feed The result is null
function admin_feed() {
//$this->layout = "ajax";
$conditions = array('conditions' => array('start >=' => date('Y-m-d h:i:s',$this->params['/FullCalendar']['start']), 'start <=' => date('Y-m-d h:i:s',$this->params['/FullCalendar']['end'])));
$events = $this->Event->find('all', $conditions);
foreach($events as $event) {
if($event['Event']['all_day'] == 1) {
$allday = true;
$end = $event['Event']['start'];
} else {
$allday = false;
$end = $event['Event']['end'];
}
$data[] = array(
'id' => $event['Event']['id'],
'title'=>$event['Event']['title'],
'start'=>$event['Event']['start'],
'end' => $end,
'allDay' => $allday,
'url' => '/full_calendar/events/view/'.$event['Event']['id'],
'details' => $event['Event']['details'],
'className' => $event['EventType']['color']
);
}
Configure::write('debug', 0);
$this->autoRender = false;
$this->autoLayout = false;
$this->header('Content-Type: application/json');
echo json_encode($data);
}
from cakephp-full-calendar-plugin.
Thanks Mahmood-R with this change i don't have any data, and now i have 500 internal server error. in firebug
When i changed $this->params['url']['start'] to ['/FullCalendar']['start'] i solved the error in firebug and status was OK.
from cakephp-full-calendar-plugin.
Did you try my code
from cakephp-full-calendar-plugin.
Yeah, with you'r code
from cakephp-full-calendar-plugin.
Thanks, showing all events whitout $conditions the output is:
{"id":"2","title":"Aerobics","start":"2013-05-05 13:05:00","end":"2013-05-05 13:05:00","allDay":true,"url":"/full_calendar/events/view/2","details":"adadadad","className":"Pink"}
from cakephp-full-calendar-plugin.
ok let me try
from cakephp-full-calendar-plugin.
Im using in full_calendar/index.ctp
<script type="text/javascript"> plgFcRoot = 'Html->url('/FullCalendar'); ?>'; </script>this is wrong??
from cakephp-full-calendar-plugin.
And with you'r new code i have null result in full_calendar/events/feed
undefined variable data
from cakephp-full-calendar-plugin.
Thanks, this my params
object(CakeRequest) {
params => array(
'plugin' => 'full_calendar',
'controller' => 'events',
'action' => 'admin_feed',
'named' => array(),
'pass' => array(),
'prefix' => '*****',
'admin' => true
)
data => array()
query => array()
url => 'admin/full_calendar/events/feed/'
base => '/hampton3'
webroot => '/hampton3/'
here => '/hampton3/admin/full_calendar/events/feed/'
}
Notice (8): Undefined variable: data [APP\Plugin\FullCalendar\Controller\EventsController.php, line 227]
null
from cakephp-full-calendar-plugin.
I changed date start and date End to an event, now the page back :
object(CakeRequest) {
params => array(
'plugin' => 'full_calendar',
'controller' => 'events',
'action' => 'admin_feed',
'named' => array(),
'pass' => array(),
'prefix' => '*****',
'admin' => true
)
data => array()
query => array()
url => 'admin/full_calendar/events/feed/'
base => '/hampton3'
webroot => '/hampton3/'
here => '/hampton3/admin/full_calendar/events/feed/'
}
{"id":"2","title":"Aerobics","start":"2013-05-11 15:05:00","end":"2013-05-11 15:05:00","allDay":true,"url":"/admin/full_calendar/events/view/2","details":"adadadad","className":"Pink"}
from cakephp-full-calendar-plugin.
On cake 1.3 i did pr($conditions); and i have this wrong date
app\plugins\full_calendar\controllers\events_controller.php (line 111)
Array
(
[controller] => events
[action] => feed
[plugin] => full_calendar
[named] => Array
(
)
[pass] => Array
(
)
[form] => Array
(
)
[url] => Array
(
[url] => full_calendar/events/feed
)
[isAjax] =>
)
Notice (8): Undefined index: start [APP\plugins\full_calendar\controllers\events_controller.php, line 112]
Notice (8): Undefined index: end [APP\plugins\full_calendar\controllers\events_controller.php, line 112]
Array
(
[conditions] => Array
(
[start >=] => 1969-12-31 06:00:00
[start <=] => 1969-12-31 06:00:00
)
)
Notice (8): Undefined variable: data [APP\plugins\full_calendar\controllers\events_controller.php, line 139]
null
and my unique event start in 2013-05-10 22:22:00 end 2013-05-12 22:00:00
from cakephp-full-calendar-plugin.
yes sure plz
from cakephp-full-calendar-plugin.
How can i contact you?
from cakephp-full-calendar-plugin.
Ok thx my email is: [email protected]
from cakephp-full-calendar-plugin.
Sorry i'm new in cakephp and i have a big time trying to solve this problem can any one Share his Working Code Please...
from cakephp-full-calendar-plugin.
Alright guys. This issue is really old and a bit confusing now. It's definitely my fault for not keeping up with this plugin but if anyone is having a problem I will try to help. I'm going to close this issue and please start a new one with the exact problem you're having. Thanks!
from cakephp-full-calendar-plugin.
Related Issues (20)
- Add more event tables HOT 4
- Unable to show the event after clicking the event in the calendar HOT 2
- I'm Using Cakestrap (Cake with Bootstrap) and i can't see the calendar HOT 2
- how to Filter events according to Event_type HOT 2
- Add Event in the calendar directly (when I click on the calendar) and saving data in database HOT 1
- Missing Controller (FullCalendarController.php) & Other Issues HOT 9
- Show only some kind of events HOT 5
- Change the Calendar event display format
- Calender not showing HOT 1
- jQuery - Newest version not compatible.
- Problem with Acl
- Disable feature for drag, drop and resize events HOT 1
- Full Calendar access
- Events not showing
- FullCalendar Integration with My Application HOT 1
- Notice (8): Undefined and no show calendar/index.ctp
- Event's not display on calendar-plugin
- Pre download HOT 1
- Fatal error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cakephp-full-calendar-plugin.