Re: Location.php

7 views
Skip to first unread message

Brett Bieber

unread,
Jul 27, 2011, 10:47:39 AM7/27/11
to David Post, unl-event...@googlegroups.com
Hi David,

On Wed, Jul 27, 2011 at 9:39 AM, David Post <lds...@gmail.com> wrote:
> I know it's been a couple of years, but I noticed that the last commit on
> the UCBCN Calendar for Location.php is also the first commit, and if we look
> at Event.php we see that there is a note saying that it is completely broken
> and does not work.  I've been trying to wrap my head around the code and
> figure out how to get Location.php insert function to be called when the
> save checkbox is checked, but for the life of me I can't figure it out.  Is
> the Location class part of Event or Eventdatetime?  Location works if we
> directly insert into the database ourselves, but that's hardly a solution
> for the faint at heart.  Are there any pointers you could give me or some
> insight into the code to help me be able to finish writing this part?  Other
> than that it looks great.

What files are you referring to? Can you provide links to the files at
http://code.google.com/p/unl-event-publisher/source/browse/ ?

Locations are standalone entities, and are stored in the locations
table. An instance of an event (eventdatetime) references a specific
location using the location_id field as the foreign key.

When using the UNL manager, a new location can be added by choosing --
New Value --, which brings up a Location subform for inserting a new
record.

Please send replies to the unl-event...@googlegroups.com list.

--
Brett Bieber
University of Nebraska-Lincoln

David Post

unread,
Jul 27, 2011, 11:04:19 AM7/27/11
to UNL Event Publisher
Below is the link for the file. The problem is if you choose --New
Value-- and check "Make this location always available" it doesn't
save. This is on a new install of the latest from the repository.
http://code.google.com/p/unl-event-publisher/source/browse/UNL_UCBCN/trunk/src/UNL/UCBCN/Location.php


On Jul 27, 10:47 pm, Brett Bieber <brett.bie...@gmail.com> wrote:
> Hi David,
>

David Post

unread,
Jul 28, 2011, 9:50:15 AM7/28/11
to UNL Event Publisher
I've tried deriving the insert function in Location.php and adding a
die() call but apparently insert never gets called.
public function insert(){
global $_UNL_UCBCN;
die("Location Insert");
return parent::insert();
}

On Jul 27, 11:04 pm, David Post <ldsd...@gmail.com> wrote:
> Below is the link for the file.  The problem is if you choose --New
> Value-- and check "Make this location always available"  it doesn't
> save.  This is on a new install of the latest from the repository.http://code.google.com/p/unl-event-publisher/source/browse/UNL_UCBCN/...

Brett Bieber

unread,
Jul 28, 2011, 10:35:27 AM7/28/11
to unl-event...@googlegroups.com
On your development environment, I would turn on the debug level
somewhere earlier on in the code.

DB_DataObject::debugLevel(5);

Then see if you can track down what's going wrong.

> --
> You received this message because you are subscribed to the Google Groups "UNL Event Publisher" group.
> To post to this group, send email to unl-event...@googlegroups.com.
> To unsubscribe from this group, send email to unl-event-publi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/unl-event-publisher?hl=en.

David Post

unread,
Jul 28, 2011, 1:30:35 PM7/28/11
to UNL Event Publisher
I see the SELECT statement for the location table, but upon submitting
it always defaults to location_id=0 for the eventdatetime table.
Before the eventdatetime table insert there is no insert for location.
Any pointers on which files I may try to look at? I put the debug
statement in the frontend manager/index.php so it gets called about as
early as you can call it.
> > For more options, visit this group athttp://groups.google.com/group/unl-event-publisher?hl=en.

David Post

unread,
Jul 31, 2011, 5:08:26 PM7/31/11
to UNL Event Publisher
I guess what I'm trying to get at is there seems to be something
missing somewhere that says, if --New Value-- then call insert. I'm
thinking it may be a linking error with
http://www.google.com/url?sa=D&q=http://code.google.com/p/unl-event-publisher/source/browse/UNL_UCBCN/trunk/src/UNL/UCBCN/Eventdatetime.php

Brett Bieber

unread,
Aug 1, 2011, 9:30:03 AM8/1/11
to unl-event...@googlegroups.com
All the relations between the subforms and insert/updating data are handled by FormBuilder.

The FormBuilder term for those references are "reverse links." You might also want to check in the prepareLinkedDataObject method and see if the linked object is being passed.

For more options, visit this group at http://groups.google.com/group/unl-event-publisher?hl=en.

David Post

unread,
Aug 1, 2011, 9:45:23 PM8/1/11
to UNL Event Publisher
Our original install was based off of the instructions given on the
Wiki. We decided to try wiping our install and going with the latest
from svn and this install is completely different. But the location
issue persists. The only advancement on the location end is that if
you click My Calendar->edit->"Event Location, Date, Time"->edit->--New
Value-- and submit a new location from here your new location is
saved. So I guess it's seeing what is different about Create Event-
>"Event Location, Date, Time"->--New Value--.

On Aug 1, 9:30 pm, Brett Bieber <brett.bie...@gmail.com> wrote:
> All the relations between the subforms and insert/updating data are handled
> by FormBuilder.
>
> The FormBuilder term for those references are "reverse links." You might
> also want to check in the prepareLinkedDataObject method and see if the
> linked object is being passed.
>
>
>
>
>
>
>
>
>
> On Sun, Jul 31, 2011 at 4:08 PM, David Post <ldsd...@gmail.com> wrote:
> > I guess what I'm trying to get at is there seems to be something
> > missing somewhere that says, if --New Value-- then call insert.  I'm
> > thinking it may be a linking error with
>
> >http://www.google.com/url?sa=D&q=http://code.google.com/p/unl-event-p...
> > > > >> > Please send replies to the unl-event-publis...@googlegroups.comlist.

David Post

unread,
Aug 3, 2011, 6:31:27 PM8/3/11
to UNL Event Publisher
After hours and days of pulling my hair out and going through three
sets of fine china being smashed against the neighbors cat I installed
it on another system. It worked. I went back to our live system and
was looking in phpmyadmin and noticed a warning about Suhosin. I had
uninstalled Suhosin from my system while getting things loaded up. I
tested reinstalling Suhosin and adding an event with a new location,
it stopped working, the event had "Unknown Location". We uninstalled
Suhosin from our live system and tested adding an event with a new
location, it worked.

Long story short, there is an incompatibility with Suhosin and the
latest SVN, at least on a default install of Debian Squeeze. If it is
some setting issues these should probably be noted on the install
wiki, which is in dire need of being updated anyway.
Reply all
Reply to author
Forward
0 new messages