wasimshaikh / php-calendar

Automatically exported from code.google.com/p/php-calendar
1 stars 0 forks source link

Cannot modify event with no catagory #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
Create an event with catagory none
2.
Try to modify event
3.

What is the expected output?
For the event to update

What do you see instead?
Error

Error modifying event.<br />Incorrect integer value: '' for column 'catid' at 
row 1<br />SQL query: UPDATE `gu35_events` SET `subject`='Open', 
`description`='', `readonly`=0, `catid`='' WHERE eid='2'

Backtrace

#0 
C:\Inetpub\Intranet\Showrooms\rotas\guildford\includes\phpcdatabase.class.php(68
3): soft_error('Error modifying...')
#1 
C:\Inetpub\Intranet\Showrooms\rotas\guildford\includes\phpcdatabase.class.php(57
3): PhpcDatabase->db_error('Error modifying...', 'UPDATE `gu35_ev...')
#2 C:\Inetpub\Intranet\Showrooms\rotas\guildford\includes\event_submit.php(89): 
PhpcDatabase->modify_event('2', 'Open', '', false, false)
#3 C:\Inetpub\Intranet\Showrooms\rotas\guildford\includes\calendar.php(681) : 
eval()'d code(1): event_submit()
#4 C:\Inetpub\Intranet\Showrooms\rotas\guildford\includes\calendar.php(681): 
eval()
#5 C:\Inetpub\Intranet\Showrooms\rotas\guildford\includes\calendar.php(649): 
do_action()
#6 C:\Inetpub\Intranet\Showrooms\rotas\guildford\index.php(75): display_phpc()
#7 {main}

What version of the product are you using?
2.0 beta 8

On what operating system?
PHP 5.2
MySQL 5.1 

Please provide any additional information below.
This issue has arisen after the fix for issue 26 (which has solved the original 
problem by the way :) ).
It only manifests if an event has no catagory.

If an event is created with catagory none you cannot modify it and leave it as 
none.  If you do the above error arises.

If an event is created and given a different catagory you can modify it with no 
problems.  You can also switch catagories from one to another but you cannot 
switch it to catagory none or the above error also arises.

This worked fine in beta 7 so I assume the fix for issue 26 has somehow caused 
it.

Original issue reported on code.google.com by Yetiland...@gmail.com on 16 Jun 2010 at 8:26

GoogleCodeExporter commented 9 years ago
It was actually the fix for issue 19 that caused this. It was just a bad fix. 
(r422 was the bad revision) I'm kind of embarrassed at how obvious that error 
was. In my defense, I tested it and it worked on my server. When I tested it 
just now, it gave me a notice (because of the affected rows bug), but the event 
did get modified. It's fixed in SVN.

Original comment by sproctor@gmail.com on 17 Jun 2010 at 12:33