Why does WYSIWYG view of a post insist on BORKING whatever the user puts in box?

Started by Beowulf1976, July 21, 2017, 01:54:08 PM

Previous topic - Next topic

Beowulf1976

On my forum, on the nexus forum which looks suspiciously SMF based.. and other forums that use SMF..


The WYSIWYG version of creating a post completely and utterly borks every single post, as soon as one starts pressing delete to remove spaces, and whenever one tries to use formatting.


WHY?!


Is there no fix for this?


Example:


All I did was delete a few spaces/blanks instead of backspacing, and when I re posted it came up with this:




I checked my error logs and I have 318,618 General errors, and they all seem to be the same:




2: in_array() expects parameter 2 to be array, boolean given




File: /***/***/public_html/forum/Themes/default/BoardIndex.template.php








on line 156, 160, 171 and 175




Lines 156-177:             if ($context['user']['is_logged']  && in_array($board['id'], boardsAllowedTo('post_new') || $context['user']['is_admin'])  && empty($modSettings['enable_new_topic_button']) && empty($modSettings['enable_new_topic_button_placement']) && !$board['is_redirect'])
            echo'         
               <a href="', $scripturl . '?action=post;board=',  $board['id'] ,'"><img src="', $settings['images_url'], '/icons/post.gif" alt="*" title="', $txt['new_topic'],'" /></a>';




            if ($context['user']['is_logged']  && in_array($board['id'], boardsAllowedTo('post_new') || $context['user']['is_admin'])  && !empty($modSettings['enable_new_topic_button']) && empty($modSettings['enable_new_topic_button_placement']) && !$board['is_redirect'])
            echo'         
               <a href="', $scripturl . '?action=post;board=',  $board['id'] ,'"><img src="', $settings['images_url'], '/english/new.gif" alt="*" title="', $txt['new_topic'],'" /></a>';








            echo '
                  </a>
               </td>
               <td class="info">
                  <a class="subject" href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';




            if ($context['user']['is_logged']  && in_array($board['id'], boardsAllowedTo('post_new') || $context['user']['is_admin'])  && empty($modSettings['enable_new_topic_button']) && !empty($modSettings['enable_new_topic_button_placement']) && !$board['is_redirect'])
            echo'         
               <a href="', $scripturl . '?action=post;board=',  $board['id'] ,'"><img src="', $settings['images_url'], '/icons/post.gif" alt="*" title="', $txt['new_topic'],'" /></a>';








            if ($context['user']['is_logged']  && in_array($board['id'], boardsAllowedTo('post_new') || $context['user']['is_admin'])  && !empty($modSettings['enable_new_topic_button']) && !empty($modSettings['enable_new_topic_button_placement']) && !$board['is_redirect'])
            echo'         
               <a href="', $scripturl . '?action=post;board=',  $board['id'] ,'"><img src="', $settings['images_url'], '/english/new.gif" alt="*" title="', $txt['new_topic'],'" /></a>';

Looking at it as someone who does not REMOTELY know what any of that means, I can see that the lines it complains about are the lines in the code that SEEM to be identical, which is:            if ($context['user']['is_logged']  && in_array($board['id'], boardsAllowedTo('post_new') || $context['user']['is_admin'])  && !empty($modSettings['enable_new_topic_button']) && !empty($modSettings['enable_new_topic_button_placement']) && !$board['is_redirect'])

[size=78%]Now whether the echo' bit is part of each line, I personally have NO idea, all I know is that it has pulled up the seemingly identical lines (which is quite possibly why the [/size][size=78%]http://custom.simplemachines.org/mods/index.php?mod=2698[/size][size=78%]]New Topic Button on Board Index mod is not remotely working)[/size]

[size=78%]I shall post here and if you guys think it's specific to that mod, I will post in that mod.[/size]




I look forward to your help.




Best wishes




Beo



I didn't actually add ANY of that font editing, your forum software did it automatically just because I pressed the delete key a few times.

"Them as can do has to do for them as can't. And someone has to speak up for them as has no voices."

Sir Osis of Liver

WYSIWYG in 2.0 is a tad buggy.  I believe it's been fixed in 2.1, but shouldn't be used in 2.0 if you're having problems.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

It was completely replaced in 2.1 as the 2.0 one was deemed unfixable with the levels of changes browsers implemented.

Beowulf1976

Thank you everyone, unfortunately I doubt I'll be moving to 2.1 any time soon :( (I am not remotely well enough at the moment to do such a task.)
"Them as can do has to do for them as can't. And someone has to speak up for them as has no voices."

Sir Osis of Liver

2.1 is still in beta, and should not be used for production forums.  Relax, and take care of yourself.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Steve

Marking solved as your question has been answered. If you have any other questions regarding this topic, by all means, mark this unsolved and let us know.

And as Sir O said, take care of yourself.
DO NOT pm me for support!

Advertisement: