Removing The URL Field Breaks Plugins?
For the past week or so, I’ve been dealing with a broken WP Comment Remix plugin although the problem is weird. I am able to use the features of the plugin in the back end but on the front end, the reply and quote links won’t do anything. Also, I’ve been noticing problems with Ronald’s Ajax Edit Comments plugin as well. I believe this has all stemmed from me removing the URL field from the comments section of the blog and then adding it back.
Why would removing the URL field cause these plugins to break or malfunction? I added the field back to the comment form, shouldn’t that have fixed the issue if that was the cause? I have been told not to use my blog as a support center but I know a couple of you WordPress gurus read this thing and I am asking for your help to figure this out.
Comment by Kyle Rush on 17 October 2008
My best guess is that when you removed the URL field it altered the database tables for the plugin. The php may be attempting to pull data from the table and when it doesn’t find the URL value in the table it may cause it to break. So, my suggestion is to take a look your database and start experimenting there.
Comment by GaMerZ on 17 October 2008
I am guessing when you remove the URL field, the field is empty and the JavaScript detect that it is null/empty but it is expecting something. And hence the JS will throw an error, once JS throws an error, all JS within the page will not work.
Perhaps you can try creating a hidden field after removing the url field.
Comment by GaMerZ on 17 October 2008
The code is:
Comment by Jeffro on 17 October 2008
Well damn, is there anyway to fix this problem. I mean, the URL field is back in place, how come things just don’t work like they used to?
Comment by Jeffro on 17 October 2008
I think I am going to reformat this WordPress installation after 2.7 is released and start over
Comment by Andrew on 17 October 2008
Jeff, I would suggest running a sql query on the comments table to replace Null URL values with empty strings. If things start to work again then that would prove the points above.
Comment by Andrew on 17 October 2008
Going forward you might like to replace the URL field with a blank hidden field.
Comment by Kyle Rush on 17 October 2008
Alright, I think this is worth a try:
If you didn’t edit your comment loop to remove the get_author_url(not sure if that’s correct, but you get the picture) then the loop will crash because it is expecting to find an author url entry in the comments table. So, just go through your database and remove any comments that do not have an author url entry. If you do this, when the comment loop executes it won’t crash because all the variables it is expecting are present.
Or, you could edit the loop to remove the get_author_url and it should work that way. Although, I’ve never used the comment plugins you are using and I have a feeling they might get fussy about that.
Comment by Jeffro on 17 October 2008
You guys are awesome, thanks for helping me out. I am going to try out an SQL query sent to me from Andrew and give that a shot. If the blog fails to load, you know who to blame!
Comment by Jeffro on 17 October 2008
Well, the plugin works just fine in the default theme but is broken in my WP-Magazine theme. Weird. Don’t know why.
Comment by Kyle Rush on 17 October 2008
Oh, please share that query with us!
Comment by Jeffro on 17 October 2008
Hey Kyle, the SQL query was as follows:
UPDATE wp_comments SET comment_author_url = “http://” WHERE comment_author_url IS NULL OR comment_author_url = “”