Fix: Message Empty Error For Embed Video Mods

Started by Team, October 22, 2007, 10:40:42 PM

Previous topic - Next topic Team

Link to Mod


This simple mod fixes a problem/bug in SMF for embedding video/clip mods.
Bug: If a user tries to post a message with ONLY a bbcode for a video clip in it, it will fail and will show the error message "The message body was left empty."
Fix: The fix adds <object> and <embed> to a list of html tags which can appear on their own in a post without any other content.

If you've got ANY of the videoclip type mods installed, you will want to install this.

Hopefully this fix will get added to a future SMF release.

Installation affects source files only (2 minor changes/additions to Post.php)
No manual theme/language edits will be required.

This mod is compatible with SMF 1.1.x and
with SMF 2.0 Beta 1 (which is currently available to Charter Members).

Please use the modification thread for support with this modification.

1.0 - 18th October 2007
o Initial release
Disclaimer: Team is not affiliated with the SMF Team or the SimpleMachines NPO. -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store


hi karl
do we really need to install this? why not update the EMBED VIDEO MOD code?
why i dont experience this?
i tried to post the youtube link and it embed the video(no space and no enter key what so ever just the link)


This fix is for all video embed mods, not just mine.  Basically any mod which adds embedded objects.

The same generic fix does it for all.
It is not practical to include this fix in any one modification (or them all) because if you uninstalled one mod, it would remove the fix and so any more mods you had installed would be affected.
The error doesnt always seem to happen for some mods, but always does for others.

In this respect its more of an smf bug than a bug related to indivdual mods.
After speaking to some SMF team members it was decided that posting it as a separate mod was the best course in the short-term.


I installed this and still get "The message body was left empty."  Could another mod block the effects?


The only mod I know which alters the same area but differently is the streaming 3 mod by 1948pal.

Please can you post
a) a list of ALL mods installed
b) a sample copy of the type of embedding you are trying to do eg

(and which mod adds that functionality)


1.     Streaming 3      4.2.2b  <-Left this on for vids already posted with that don't show up when this is deleted. But could delete it if this is the problem.     
2.    Auto Embed Video Clips    1.2    
3.    SMF Shoutbox    1.16b    
4.    Chatroom Button    1.01    
5.    SMF 1.1.4 Search "brd" Bug Fix
6.    Location Mod    1.2    
7.    Users Online Today Mod    1.4.0    
8.    Fix Message Empty Error For Embed Video Mods    1.0    
9.    RSS Feed Poster    1.0.4    
10.    GoEar BBCode by Mike Menendez    0.4    
11.    SMF Gallery Lite    
12.    E-Arcade    2.4.2    
13.    Custom Profile Field Mod

I just dropped a Youtube video in the message box and have tried this with several YT videos and still get that message necessitating putting a period in the box to post minus text.  Otherwise the mod works great eliminating the need for the Youtube brackets.


It appears that this is a bug with the streaming mod.

I'm going to contact 1948pal about it.

If your uninstall that the streaming mod, the fix will work. Although you might need to uninstall this mod first to be able to uninstall the streaming mod, then reinstalling this one.


Unfortunately, removing the streaming mod and the fix mod and reinstalling the fix mod didn't work. I still get "The message body was left empty."


I think I see the problem. The uninstall didn't remove all of the streaming mod. My post buttons are screwed up. 

I get text where the buttons were. See example below:

Insert FlashInsert GoEar DataAdd Windows media sound or movies to your posts!Add Real media sound or movies to your posts!Add QuickTime media sound or movies to your posts!Add Google video to your posts!Add YouTube stream to your posts!Insert ImageInsert HyperlinkInsert EmailInsert FTP Link|Insert TableInsert Table RowInsert Table Column|SuperscriptSubscriptTeletype|Insert CodeInsert Quote|Insert List

Chriss Cohn

I hope that the Developers have already took notice of it..... :-\

Thanks for that Karl!
Great Job!

Regards, Christian


awesome! it does get annoying, thanks for the fix! ;D


I have reuploaded this mod and screenshots for it.

I am in the process of doing it for ALL my other mods aswell.  Please bear with me.


excellent, takes away a very annoying thing, how would I do this for the img tag ?   
I don't fully understand the code and what it does in post.php

any clues appreciated


SMF by default should allow <img> image only posts.


is there a switch in admin that I have missed then because mine doesn't ver 1.1.4


no there isnt a switch, it should be automatic.

Are you using the streaming 3 mod?  i remember that was a bug with it.


ehm.. maybe a stupid question, but the only video mod i have installed is yours andif i remember.. it doesnt use bbcode.. so, should ik isntall it anyway then?
Sorry for my poor English, but i think it's probably better then your Dutch :)



It shouldn't be needed for AutoEmbedVideo mod.

It might be needed for other bbcode mods (of which I've got a few ;) )


oh.. oke.. thanks for the answhere :D

But.. why need a nother mod.. when your mod does it all?
Sorry for my poor English, but i think it's probably better then your Dutch :)