ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Message: Trying to get property of non-object and forum not parsing tags

October 26, 2011 9:17pm

Subscribe [4]
  • #16 / Nov 02, 2011 5:12pm

    Kevin - your PM box is full btw, can’t send you PMs. 😊

  • #17 / Nov 02, 2011 11:47pm

    Dan Decker

    7338 posts

    Hi Tyler,

    EllisLab staff generally keep our PMs disabled. Folks have a habit of PMing sensitive info to us, and that is insecure. So, to protect everyone, we keep them turned off.

    If you have a chance to move the other tags out of the template where you call {exp:forum} and into the actual forum themes, do you still experience the PHP errors?

    Cheers,

  • #18 / Nov 08, 2011 7:50pm

    Woah, didn’t get a notification about this reply, sorry about the delay.

    This helped a lot. I narrowed it down to this code from an embedded template:

    {exp:member:custom_profile_data}
    <?php 
           global $SESS;
           $pmcount = $SESS->userdata['private_messages'];                          
           if ($pmcount == 1) {
                 echo "$pmcount message";
           }else if($pmcount > 1){
                 echo "$pmcount messages";
           }else{ 
                 echo 'No messages';
           } 
    ?>
    
    {/exp:member:custom_profile_data}

    So the question becomes: what changed with $SESS in EE2?

    Also, very important, any ideas as to what’s going on with the wiki tag parsing?

  • #19 / Nov 10, 2011 4:56pm

    Dan Decker

    7338 posts

    Hi The Shotwell Company,
    Here is the updated documentation on Session handling in ExpressionEngine 2. Specifically, it is called via the object;

    $this->EE->session->userdata();

    That fix should work for the Wiki as well, since it applies to the typography class, and therefore should flow system-wide.

     

  • #20 / Nov 10, 2011 5:22pm

    That fix should work for the Wiki as well, since it applies to the typography class, and therefore should flow system-wide.

    Thanks Dan. The fix provided only affects url and img tags. With the wiki it’s not parsing any capitalized tags (and there are a lot!). Eg.

    [FLOATRIGHT]
    [ALERTBOX2][ICON:T_EYEGLASS][TITLE2]Featured Article - [/TITLE2][ALERT][TABLE][TR][TD]http://www.example.com/psychopedia/_featured/_featured_G4.jpg[/TD][TD]For our first featured article, we'd like to present to you the [[G4 IDs]] located within the awesome [[Extra::Videos|Videos]] section. G4 asked Client to produce some quick bumper videos and now we finally have a place to share them with you forever.
    [/TD][/TR][/TABLE][/ALERT][/ALERTBOX2][/FLOATRIGHT]
  • #21 / Nov 14, 2011 12:26pm

    Kevin Smith

    4784 posts

    Good catch. I’ll make sure Robin sees this post as well. I assume the fix for these will likely be very similar, so I’ll let her respond with the solution.

  • #22 / Nov 15, 2011 1:14pm

    Okay, we’re still waiting to be able to finish the site upgrade because of this issue. Is there a fix or suggestion as to how to get around it in the mean time? Or perhaps a timeline as to when this would be resolved?

    Thanks!
    Tyler

  • #23 / Nov 15, 2011 5:48pm

    Robin Sowell

    13255 posts

    Honestly?  I can’t see those were ever allowed as BBcode- I tested on a 1.x install just to be sure- they’re not allowed/transformed.  My first guess if it was working is that a file was modified or a 3rd party formatting option is being used in the 1.x install.

    If you can check the wiki settings in 1.x- what’s the ‘Text Formatting for Articles’ set to?  May be an addon that does parse those tags.

    If it’s using EE’s native typography class- the only BBCode converted is that specified in the $this->safe_decode array:

    $this->safe_decode = array(
      'b'     => 'b', 
      'i'     => 'i',
      'em'   => 'em', 
      'del'   => 'del',
      'ins'   => 'ins',
      'strong'  => 'strong', 
      'pre'   => 'pre', 
      'code'   => 'code', 
      'blockquote' => 'blockquote',
      'quote'   => 'blockquote',
      'QUOTE'   => 'blockquote'
      );

    Heading tags are merged into that array and some few deprecated are converted to them as well as color/style tags- but tables and such are definitely not.  I did switch to an ireplace in system/expressionengine/libraries/EE_Typography.php so that upper case is supported- but that’s not really going to solve your problem- see line 746:

    /** -------------------------------------
      /**  Decode BBCode array map 
      /** -------------------------------------*/
        
      foreach($this->safe_decode as $key => $val)
      {
       $str = str_ireplace(array('['.$key.']', '[/'.$key.']'), array('<'.$val.'>', '</'.$val.'>'), $str);
      }

    Note- this is how 1.x handles it as well- hence it’s not the update per se causing the problem.

    Thus the first thing I’d check- is a non-native plugin being used to format it in 1.x?  If so- switching to that in 2.x, assume a 2.x version is available, should take care of it.

    The other option is a hack- which I wouldn’t do.  I’d write a plugin that allows you to include what you need in the bbcode conversion.

    Does it make sense what’s going on?  Those BBCode options have never been supported natively.  So something else was being done to get them working in 1.x.

  • #24 / Nov 15, 2011 8:48pm

    Thanks Robin. I’m having a bit of a du-uh moment because I should have looked at the wiki settings and seen the plugin for formatting. Sorry about that. You’re right - it’s some sort of custom thing by derekderekderek.com that we’ve never seen before. We’ll figure that out and find some solution.

    Thanks for all your help EE team!

    Tyler

  • #25 / Nov 16, 2011 9:23am

    Robin Sowell

    13255 posts

    😉  I should have thought of it earlier, but it wasn’t until I saw the table tags that I realized no way it was native EE.  Glad we got it figured out and hopefully updating the plugin won’t prove difficult.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases