Login

Member stats
Location
ForumHelp & Support • Can't delete news items

Post a reply!
1 2 >
Access: Member
Total posts: 14

Status: Offline
Can't delete news items Quote 
N-13 News is working perfectly on my site, except that I can't delete any news stories!  When I check the news item checkbox and click 'delete', I get the popup message asking to confirm the delete. When I click Ok to delete, the page refreshes but the news story is still there.  I've tried to delete from the summary display and from the detail dialog, but neither one works.

Any ideas?

(PS: I am running on a Windows based server, PHP 5.2.6, and MySQL 5.0.51a)
02:51am 10th Jul 2009 
Access: Admin
Total posts: 1069

Status: Offline
Re: Can't delete news items Quote 
Hi Ccs9623,

Can you try create a new category then deleting that to see if it works as it uses a simliar method.

Also, are you using Apache or IIS?
10:22am 10th Jul 2009 
Last edited by Chris at 12:17pm 10th Jul 2009
Access: Member
Total posts: 14

Status: Offline
Re: Can't delete news items Quote 
Categories appear to delete, but when I do that, I get these errors/warnings running down the menu column (left of the main dialog):

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 18 in C:\Websites\AFC-Beta\news\config.php on line 101

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 19 in C:\Websites\AFC-Beta\news\config.php on line 105

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 20 in C:\Websites\AFC-Beta\news\config.php on line 110

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 21 in C:\Websites\AFC-Beta\news\config.php on line 101

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 22 in C:\Websites\AFC-Beta\news\config.php on line 105

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 23 in C:\Websites\AFC-Beta\news\config.php on line 110

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 24 in C:\Websites\AFC-Beta\news\config.php on line 101

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 25 in C:\Websites\AFC-Beta\news\config.php on line 105

Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 26 in C:\Websites\AFC-Beta\news\config.php on line 110
....

The errors continue on like this for quite awhile.  However, if I go back to the main menu --> Options --> Categories, the category has been removed successfully.

I am running Abyss Web server (Link which I have used for about 5 years without a problem.

I looked through the admin.php file but I can't see where a delete is happening in the the table.  Must be old eyes :new_grin:
02:36pm 10th Jul 2009 
Access: Admin
Total posts: 1069

Status: Offline
Re: Can't delete news items Quote 
The only thing I can think of that could cause this would be either register_globals or magic_quotes_gpc

When you login to the script and are looking at the home/stats page, does it give you any warnings in yellow there about either register_globals or magic_quotes?
02:53pm 10th Jul 2009 
Access: Member
Total posts: 14

Status: Offline
Re: Can't delete news items Quote 
Register_globals was on when I did the installation, but I turned them off.  I can't get to my php.ini file at the moment, but what setting should I have for the magic_quotes_gpc?  (just change it to whatever it isn't now?)

Added:  Ok, I just checked, and I have magic_quotes_gpc = Off
03:55pm 10th Jul 2009 
Last edited by Ccs9623 at 03:58pm 10th Jul 2009
Access: Member
Total posts: 14

Status: Offline
Re: Can't delete news items Quote 
AH-HA!

I decided to try Firefox instead of IE and sure enough, that worked!  I've got IE 8 as my default browser which most of the users for this particular site are going to use as well.

Is the edit/delete function using AJAX?  perhaps its just a matter of checking for the browser being used.

If you don't have time/desire to look at this further, can you tell me where I might look to find the delete code?  Maybe I can spot something.

Thanks!
04:06pm 10th Jul 2009 
Access: Admin
Total posts: 1069

Status: Offline
Re: Can't delete news items Quote 
Seems when you submit the form, IE isn't passing the values of the checkboxes you selected, so when the page reloads it hasn't been given any information to delete the posts.

I'll have a look at this tonight, hopefully should be fairly easy to fix.
05:42pm 10th Jul 2009 
Access: Member
Total posts: 14

Status: Offline
Re: Can't delete news items Quote 
Cool!  I appreciate the time and effort.

I've looked at no less than a dozen 'news' scripts and this is the best one I've found for what I need.  You're coding style is awesome!!
05:56pm 10th Jul 2009 
Access: Admin
Total posts: 1069

Status: Offline
Re: Can't delete news items Quote 
I think I fixed it. If you download this file.

Extract it and upload the editnews.mod file to your news/modules directory.

You now hopefully should be able to delete news posts in IE.
09:09pm 10th Jul 2009 
Last edited by Chris at 09:10pm 10th Jul 2009
Access: Member
Total posts: 14

Status: Offline
Re: Can't delete news items Quote 
Great, thanks!  I'll try it out later tonight and post the results here.
10:39pm 10th Jul 2009 
1 2 >
Post a reply!