Is that in the file I sent you? You can take that out. Those files were made when that requirement was necessary.
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
The reference to calendar_toggle.js is from the files you posted on the tutorial, so I figured it was needed. As for why the announcements are breaking I'm not sure, that's what I'm trying to find out. It really does everything it's supposed to except for save it to the db.
It's really frustrating it actually does all the same steps that my non extended Calendar does.. Makes it a lot harder to figure out the problem and as far as I can see there is no problem with my code. I'll try taking the files you posted and see if it works. If it does I'll just replace what I have with your files. At least it'll be fixed.
The development on this project has been so rapid, it's really difficult to keep the documentation up to date. Most of what is in there is still accurate, but some functionality has been added and lost, as well.
I'm quite sure this bug was resolved a couple versions ago. I was experiencing it as well as one other user, and when I checked in the change, they were both fixed. Can you confirm that line 244 of CalendarDateTime.php reads as follows?
if($obj == "DataObjectManager") {
$table->setAddTitle("Announcement");
$table->setParentClass("Calendar");
}
Actually, I may have answered my own question. It appears that the fix was only added for DataObjectManager users. If you're on a CTF, you're not getting the setParentClass(). Will check that in now.
Ok, check out the latest version and let me know how you do. I'm assuming you do not have DataObjectManager installed on this site?
Thank you UC! :D
If DataOjbectManager is another module then no. The only module I have is the event_calendar, but now it works. Thanks for the updates! If there's anything I can do to help just let me know I'll keep an eye out for other bugs or glitches I might encounter. Thanks for all the help
One thing I'm not really familiar with in Silverstripe is getting the table to use custom formatting for each field. For instance, it would be nice if the Start Date / End Date didn't display in MySQL timestamp format -- or if the Time could display in 12 hour format optionally. Any idea how to do that? Can't I just change the headings array in my table to something like:
array ('StartDate' => 'StartDate.Nice' ...etc..)
I followed all tutorial (except adding Staff).
My goal is to make Seminars for our Dept, each seminar consists of weekly events and each even has its own speaker, title, ....., and Content which must be formatted properly. There are two possible ways to do it
1) Consider each seminar as repeating event. In this case speaker, ... should be added to WorshopDateTime. But what about Content? Is it possible to add Content (editable with TinyMCE to WorkshopDateTime)
2) Consider each seminar meeting as separate event (Workshop) and each seminar as WorkshopHolder. But then I need AllWorkshopHolder which is parent to WorkshopHolder and displaying all its children. How to do it?
Sure, we can make all seminars as categories but we really want to have them in Menu(2) (it is more observable than pulldown and also some seminars are external so we just place there Redirects)
Thanks!
Victor
Well, the big question is how many seminars will you have?
If you want to have editable HTML content on a DateTime object, you can install the DataObjectManager, and change the Content field to a SimpleHTMLEditorField.
WorkshopDateTime.php
function extendAnnouncement()
{
$this->removeAnnouncementField('Content');
$this->addAnnouncementField(new SimpleHTMLEditorField('Content'));
}