YAFLogo

sbarakat
  • sbarakat
  • 50.6% (Neutral)
  • YAF Forumling Topic Starter
14 years ago
Although this is not directly a bug in YAF (v1.9.3) I thought it was worth mentioning incase anyone else stumbles across the same problem.

I have installed the forums in a subdirectory ~/forums along with BlogEngine.NET (v1.5) found under ~/blogs. I did the usual install steps:

* move ~/forums/bin and ~/blogs/bin to ~/bin

* move ~/forums/App_Code to ~/App_Code/YAF

* move ~/blogs/App_Code to ~/App_Code/BlogEngine

* merged the web.configs

* etc. etc.

All worked well until I tried the Search function on the forums where I ran across this error:

(0): error CS0117: 'BBCode' does not contain a definition for 'RegisterCustomBBCodePageElements'

The same error also turned up when trying to view a post.

The error is caused by a call to BBCode.RegisterCustomBBCodePageElements. BlogEngine.NET also has a class called BBCode found under ~/App_Code/BlogEngine/Extensions/BBCode.cs. So YAF is calling the incorrect class.

To resolve the issue I had replaced the call to

BBCode.RegisterCustomBBCodePageElements

with

YAF.Classes.UI.BBCode.RegisterCustomBBCodePageElements

The changes were made in the following files

pages/cp_message.ascx.cs

pages/lastposts.ascx.cs

pages/posts.ascx.cs

pages/search.ascx.cs

After that no more errors :)

As I said this is really an issue with BlogEngine not using namespaces for their classes but maybe one of the developers can pick this up and add it to SVN. I also noticed that it has already been done in these files:

pages/profile.ascx.cs

App_Code/YAF/ForumEditor.cs

I'm surprised no one else has come across this issue as I tried searching around but came up with nothing...

Sponsor
Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
14 years ago
Thanks for the bug report. Yeah, that's a little silly they didn't namespace their class. BlogEngine.NET has a few issues, I'm finding.