Lyx Beamer presentations error ( \lyxframeend)

I am trying to write my thesis presentation with Beamer on Lyx , but i have an issue which is driving me crazy..

When i add a section/part or something else i get this error :

    \lyxframeend
{}\section*{fghfgh}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., \hobx'), type I' and the correct
spelling (e.g., I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


I also attache a screenshot in order to understand my issue :

-
I think this is improved in LyX 2.1 (to be released "soon"). –  scottkosty Jun 23 '13 at 5:02
If you are using Ubuntu and want to test it out (it is quite stable now and can be installed alongside your current version of LyX), use the LyX PPA –  scottkosty Jun 23 '13 at 5:03
It seems that the custom macros LyX use, \lyxframe and \lyxframeend, are only defined if you manually add BeginFrame and EndFrame to your document, from the drop down-menu in the top left. The problem occurs because LyX automatically adds an \lyxendframe first, when you add a section, but without adding the definition of \lyxendframe. Hence, you have to, at some point, add an EndFrame to your document to avoid this error.
@ALdaperan That is quite normal, the default beamer` theme doesn't add section/subsection names, only frametitles. You should ask a separate question about that though, it is a completely different problem. (I don't know the answer anyway.) Also, please consider accepting my answer, to mark the question as answered. –  Torbjørn T. Jun 22 '13 at 18:27