![]() |
Custom BBCodes not working after rebuilding post cache
The title says it all.
I have reprocessed the post cache of all my forum's posts. Now the custom [ YOUTUBE][/YOUTUBE] bbcodes (without the space) no longer work in older posts. When I post a new one, the embedded videos do show. Old posts just show the bbcode. |
Hmm...maybe it doesn't work right if you rebuild the post cache from the admincp. You could try just deleting the post cache and see what happens (it will get rebuilt as users view posts).
|
If you edit one of the older posts, what is it showing exactly for the full bbcode? Is it any different from a post that is working?
|
If you disable post caching does it work or not?
|
Where can I find the setting to turn off the post cache? :confused:
When I edit an older post, the youtube embed words again. So there is nothing wrong with the bbcodes, they just don't get replaced when rebuilding the post cache. |
If you edit one of the older posts, what is it showing exactly for the full bbcode? Is it any different from a post that is working?
Like is the code in lowercase and and the working code is in uppercase? Or do you just click on edit post, then save changing nothing, and it works? |
Quote:
|
I set the post cache lifetime to 0 and then revisted older posts with an embed.
They are not showing the embedded video, just the code. The case of the bbcode should not matter. WHen I add a new post, the bbcode can be upper or lower case. I expect the same behavior from the post parser. --------------- Added [DATE]1416302924[/DATE] at [TIME]1416302924[/TIME] --------------- I have also just disabled all plugins and turned the post cache time to 0. The custom BBCodes are still not parsed. --------------- Added [DATE]1416302989[/DATE] at [TIME]1416302989[/TIME] --------------- When I edit an older post and just hit the save button, the code gets parsed and the video shows. |
Try running the "Hourly cleanup #2" scheduled task. That should remove cached posts that are older than the limit (all of them, since you have it set to 0). From what you said it definitely sounds like it's a problem with the posts in the rebuild cache, so you just need to clear it.
|
I did rebuild all posts twice, using the maintenance task. That should have rebuilt the posts.
But it's actually what has caused the problem. I would prefer not to delete all cached posts. That would only increase the load on the server. Instead, I would prefer to fix whatever problem there is with the BBCode parser that is used when the post cache is rebuilt. |
Is it a mod that adds the YOUTUBE bbcode? Then you'd have to find out if they can help you. If it is a mod then I'd guess that it uses a hook that isn't called from the admincp.
If I understand things (based on a quick look at the code, so I may not understand), when you set the cache time to 0 the cached posts will get deleted as soon as the Cleanup #2 scheduled task runs, so they may have already have been deleted anyway. But like I said before, if the cache time is > 0 then the cache will get built as users view posts, so that seems like it could even be better than building it all at once from the admincp (unless you were doing it in the middle of the night or something). Edit: reading your post again, I'm thinking maybe there's a misunderstanding about the problem. I'm thinking if the post cache has been built incorrectly, then you'd have to build it again even if the problem were fixed. It sounds like maybe you're thinking that you could fix the problem and avoid rebuilding the cache? I suppose that's a possibility, depending on how the mod works. In any case, that's all I have to say, I'll let someone else help. |
It is a mod that does the [ youtube ] tags. I seem to recall I had this same issue on my site with the mod and had to modify it. I would suggest you check the modification thread and see if it's been mentioned and if a fix was posted there.
|
1 Attachment(s)
No, it's not a mod. I just used the "BB Code Manager" in the backend to define this custom BBCode. (Unless this BBCode Manager is a mod).
Attachment 150988 I noticed that other custom codes in the BBCodeManager did not get replaced, either, when I rebuilt the post cache. |
I have disabled all plugins now and will rebuild the post cache. That will take a few hours.
I am very sure that the problem will persist. I will report back... |
Quote:
Sorry to question what you said, but like Lynne said, if it's a mod then you should check in the mod thread. For example, in the AME 2.5 Media Embedding mod, there's this: https://vborg.vbsupport.ru/showthrea...202476&page=35 and if you scroll down to post #517 you'll see they are talking about that exact problem. |
I just
Disabled all plugins. Then deleted the parsed post for a certain post in the database. Disabled caching. Loaded the post -> the embedded video was showing. Deleted the parsed post from the database. Turned on post caching. Rebuilt the post cache. The embedded video was not showing. I have made plenty of mods to the code over the years. The thing is I very rarely run the post cache maintenance. There are only two mods in class_bbcode.php and they should have no effect on the parser. in class_bbcode.php, I see this: PHP Code:
Where can I find the datastore? How do I flush it? |
Do you have AME installed?
|
Quote:
|
I did var_dump($this) in the class_bbcode.php. The bbcode parser object contains the custom bbcode.
I just noticed that the bbcode parser is not even replacing the img tags in the post parser. My forum is messed up! :( |
Quote:
But if you're showing that the YOUTUBE custom bbcode has been loaded when you're doing a "rebuild post cache", then I don't know why it's not being used. I think it's possible to define two codes with the same tag, one with and one without an option. Is it possible that the custom code you defined doesn't match what you see in the posts (option-wise, I mean)? |
Okay, I have deleted all parsed posts. When I visit posts with embedded bbcode, they are now showing up correctly. They are also staying like that when I reload.
So it's only the admin backend's post cache function that's broken. --------------- Added [DATE]1416513401[/DATE] at [TIME]1416513401[/TIME] --------------- Strange. Why would VB not cache the img tags? Makes no sense to me to leave them out. |
Quote:
Edit: oh, yeah, each user can turn off images, so I guess that had to be handled in some way. |
All times are GMT. The time now is 05:57 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|