Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Syntax Highlighter is failing to highlight php properly
Avatar
rickandersonaia
Edmonds, WA - USA
Member
sp_UserOfflineSmall Offline
Sep 3, 2014 - 6:23 pm

This is a newish issue - that showed up after a recent upgrade.

It seems to highlight CSS just fine - an example from today - http://www.byobwebsite.com/for.....ge/#p25651

But fails entirely with PHP - an other example from today - http://www.byobwebsite.com/for.....ge/#p25653

I have tried deleting it and redoing it several times, including inserting the code into a blank post, but nothing seems to work.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 3, 2014 - 6:57 pm

We use the highlighter regularly here with php and with no issue showing up. How did you actually do that on the post link you gave? I don't see any of the normal syntax highlighter html...

andy-signature.png
YELLOW
SWORDFISH
Avatar
rickandersonaia
Edmonds, WA - USA
Member
sp_UserOfflineSmall Offline
Sep 3, 2014 - 8:00 pm

I select the text - click the highlighter and choose php.

Generally the text is cut directly from NetBeans, although I did try pasting it into notepad first to see if it helped.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 3, 2014 - 8:18 pm

Upgrade of what? Are you using latest SP and latest tinymce and syntax highlighting plugin?

Any other plugins that format page content? Does your theme or other plugin  add any buttons to wp editor? The fact much or all of our inserted html and css are getting stripped is suspicious...

As Andy said, this plugin is very popular with no other reported  issues and we use it almost daily here.... Not saying you are not having an issue, but it's not a systemic one so need to identify what is going on locally for you..

Avatar
rickandersonaia
Edmonds, WA - USA
Member
sp_UserOfflineSmall Offline
Sep 4, 2014 - 11:00 am

Yeah, I'm sorry - upgrade of SP and all of the related plugins.  

No, I don't use any TinyMCE editor related plugins - A couple of plugins do add buttons to the post editor - but not the forum editor.

I'll troubleshoot this further by deactivating all other plugins to see what happens and post the results back here.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 4, 2014 - 11:16 am

Please do check these. We have encountered several plugins that add items to the tinyMCE editor (i.e., for the blog post creation side) where the authors have not taken into consideration the editor can also be used on the front-end and their code has caused problems with the editor's use within Simple:Press. They often seem to hook it into the WP 'init' hook where it should be the 'admin_init' hook for example.

Also feel free to paste some code here and try the highlighter as a test run.

andy-signature.png
YELLOW
SWORDFISH
Avatar
rickandersonaia
Edmonds, WA - USA
Member
sp_UserOfflineSmall Offline
Sep 4, 2014 - 6:05 pm

This appears to have something to do with pasting.  For example the code below doesn't get the pre sf-brush tag added to it when I paste.  Although if I type it directly it works just fine.

/*******************************************************************
* Wishlist Member Login Widget
********************************************************************/
.WishListMember_Widget .widget-title {
margin: 0 0 15px 0;
}

.custom #wlmember_loginwidget label input
{
margin-bottom:5px;
}
.custom #wlmember_loginwidget input[type=submit] {
color: #fff;
background: #0e426c;
border-left: 1px solid #7ab7e8;
border-top: 1px solid #7ab7e8;
border-right: 1px solid #084577;
border-bottom: 1px solid #084577;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
height:25px;
width:100px;
cursor:pointer;

}
.custom #wlmember_loginwidget input[type=submit]:hover {
border: 1px solid #555;
background: #7f7e7d;
}

Avatar
rickandersonaia
Edmonds, WA - USA
Member
sp_UserOfflineSmall Offline
Sep 4, 2014 - 6:05 pm

Actually it didn't work on yours either!

Avatar
rickandersonaia
Edmonds, WA - USA
Member
sp_UserOfflineSmall Offline
Sep 4, 2014 - 6:11 pm

Here's a test to go along with the video

/*******************************************************************
* Wishlist Member Login Widget
********************************************************************/
.WishListMember_Widget .widget-title {
margin: 0 0 15px 0;
}

.custom #wlmember_loginwidget label input
{
margin-bottom:5px;
}
.custom #wlmember_loginwidget input[type=submit] {
color: #fff;
background: #0e426c;
border-left: 1px solid #7ab7e8;
border-top: 1px solid #7ab7e8;
border-right: 1px solid #084577;
border-bottom: 1px solid #084577;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
height:25px;
width:100px;
cursor:pointer;

}
.custom #wlmember_loginwidget input[type=submit]:hover {
border: 1px solid #555;
background: #7f7e7d;
}

Avatar
rickandersonaia
Edmonds, WA - USA
Member
sp_UserOfflineSmall Offline
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625