Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: njtweb on June 13, 2018, 02:02:15 PM

Title: Post I cannot delete
Post by: njtweb on June 13, 2018, 02:02:15 PM
I have a custom bbcode in this post. I deleted the post that the bbcode references by the URL within the bbcode tags, (a completely separate post). No I can't open this or delete it. Is there any way to edit this post or delete it in ACP?

I get this message when I click on it.
Call to undefined function mysql_num_rows()

This is the post
https://www.youthhockeyinfo.com/index.php/board,70.0.html
Title: Re: Post I cannot delete
Post by: Kindred on June 13, 2018, 02:11:07 PM
fix the code that is not allowing the post to be deleted...
that can't be the ONLY error. There would be a filename and line number in the error as well...



(no, there is no other interface to delete posts)
Title: Re: Post I cannot delete
Post by: njtweb on June 13, 2018, 02:25:34 PM
Quote from: Kindred on June 13, 2018, 02:11:07 PM
fix the code that is not allowing the post to be deleted...
that can't be the ONLY error. There would be a filename and line number in the error as well...



(no, there is no other interface to delete posts)

That's the only post in about 450. The post it references is a poll post. The URL for the poll was inside the tags in the post I cannot open. Every other team post has the same custom BBcode tags in them and they open fine.

Thank you
Title: Re: Post I cannot delete
Post by: Kindred on June 13, 2018, 03:55:57 PM
we can't help without the actual, full error message

otherwise, the only thing we can say is "fix your code" since you (or a mod) obviously broke something
Title: Re: Post I cannot delete
Post by: Chen Zhen on June 13, 2018, 05:13:04 PM
Kindred is asking you to go to your Admin section & look at the actual error message in the log & post the results in a quote here in this thread.
Admin -> Logs -> Error Log

When you go to your SMF error log, left click on the magnifying glass icon that states "Apply Filter: Only show the errors with the same message".
( when on one of the errors that show undefined function mysql_num_rows() )
Then copy & paste the error message(s) inside a quote bbcode tag in this thread.

BTW - unrelated to your error but ensure to update your personalized bbc mod from my website. I can tell from the page XHTML that you are using an older version.
Title: Re: Post I cannot delete
Post by: Aleksi "Lex" Kilpinen on June 13, 2018, 11:54:20 PM
Also the complete error when clicked could be useful, the error in the OP seems like it is only a part of an error.
Title: Re: Post I cannot delete
Post by: shawnb61 on June 14, 2018, 12:19:55 AM
You can try:
   Admin | Maintenance | Forum Maintenance | Routine | Find and Repair Any Errors

I think the links to all boards & topics on that site are very interesting...  They all point to .html files, e.g.:
https://www.youthhockeyinfo.com/index.php/topic,48.0.html
Where I'm used to seeing something more like:
https://www.youthhockeyinfo.com/index.php?topic=48.0

Is that a portal mod or URL mod that does that?   


Title: Re: Post I cannot delete
Post by: landyvlad on June 14, 2018, 01:02:07 AM
Queryless URLs - Turns the use of queries in the forum's URLs on and off (../index.php/topic,1.0.html compared to ../index.php?topic=1.0). In the Admin Center, this setting is referred to as Search engine friendly URLs.

Search engine friendly URLs - When enabled, queryless URLs are used for forum pages. This means they look like ../index.php/topic,1.0.html instead of ../index.php?topic=1.0. This option was introduced in order to help search engines index forum pages, but there is no longer any reason to use it, as search engines are now capable of indexing both formats. The queryless URL format only works for Apache and Lighttpd.

Title: Re: Post I cannot delete
Post by: shawnb61 on June 14, 2018, 01:10:08 AM
Thanks for that explanation - very helpful.  I had never experimented with that option. 
Title: Re: Post I cannot delete
Post by: Kindred on June 14, 2018, 04:20:09 AM
Btw, that setting is basically useless and is left over from 15 years ago, when search engines had trouble with ? In the url...

It really does nothing useful these days
Title: Re: Post I cannot delete
Post by: GigaWatt on June 14, 2018, 09:55:37 AM
@njtweb: Try to view the post from the profile of the user (admin). Open the profile and click on Show Posts, see if the same error pops up.
Title: Re: Post I cannot delete
Post by: shawnb61 on June 14, 2018, 02:53:21 PM
Quote from: shawnb61 on June 14, 2018, 12:19:55 AM
You can try:
   Admin | Maintenance | Forum Maintenance | Routine | Find and Repair Any Errors

Have you tried Find and Repair Any Errors yet?
Title: Re: Post I cannot delete
Post by: njtweb on June 14, 2018, 04:14:26 PM
Ok.

So....

@Aleksi "Lex" Kilpinen Here is the post https://www.youthhockeyinfo.com/index.php/topic,48.0.html

I can't click anything, it's just that message. I didn't do anything different than any other team information post except delete the poll referenced in the bbcode I have embedded in that posts subject.

@Chen Zhen - I don't see anything in the error log that says this Apply Filter: Only show the errors with the same message

Title: Re: Post I cannot delete
Post by: vbgamer45 on June 14, 2018, 05:43:22 PM
If you need help I can take a look requires ftp access. And I can see what is going on.
Title: Re: Post I cannot delete
Post by: Chen Zhen on June 14, 2018, 10:23:24 PM
Look at the attached image to this post.
Do you see the magnifying glass that I circled?
The text I was referring to pops up when you hover over the magnifying glass and you can click on it.
This allows you to filter messages in your error log.

Either way all you have to do is copy & paste the entire error text from the related error (one that shows Call to undefined function mysql_num_rows() ).
If we can see the name of the file that is throwing the error then we can likely pinpoint which modification is causing the error.
Or you can do a screenshot/crop like the image I attached if you want (but show the entire error message).. whichever you prefer.
Title: Re: Post I cannot delete
Post by: shawnb61 on June 14, 2018, 10:31:27 PM
Quote from: shawnb61 on June 14, 2018, 02:53:21 PM
Quote from: shawnb61 on June 14, 2018, 12:19:55 AM
You can try:
   Admin | Maintenance | Forum Maintenance | Routine | Find and Repair Any Errors

Have you tried Find and Repair Any Errors yet?

There really is an existing function that fixes stray/orphaned topics & posts. 

Third time's a charm!    ;D
Title: Re: Post I cannot delete
Post by: njtweb on June 15, 2018, 09:01:30 AM
Thank you everybody for your help and interest in helping. Turns out the problem was the custom bbcode. If the post referenced in the URL that is embedded is deleted it will cause the issue. She's fixed the problem. All good now.