Elgg 1.8.3 dep issue...

elgg 1.8.2 fine...

then elgg 1.8.3..... what the hell happened??!?!?!?!

Screenshot : 

http://www.photographyfriends.co.uk/omg.jpg 

  • What version of Tidypics are you using? I assume it's not the Preview version for Elgg 1.8. Earlier versions are NOT  FULLY COMPATIBLE with Elgg 1.8. I guess the error messages were already there before. They were just not getting displayed. Elgg 1.8.3 changed the behaviour of error messages display. You should only see them when logged in as admin. But they might no longer get surpressed when being logged in as admin regardless of error log settings.

    The Tidypics Elgg 1.8 preview might help you. But don't expect it to fully work either as it's not final and feature complete yet.

  • @dJ:

    In Elgg.1.8.3 -- those deprecated mssgs are only shown to the Admin ;-) Your normal users will not see them.. So you gotta live with it when logged in as Admin ;) If you wanna not see these mssgs as Admin - holler.. and we'll post the 1/2 line of core code needed to fix.. ;-oO

  • I'm hollering! I think that it should be possible to turn these warnings off. Please could it be an option? There are several alleged 1.8 plugins that are not quite perfect yet, but that work fine from an end-user perspective. Important to be able to identify their problems, but even more important to be able to manage the site in the meantime.

    Case in point: I've installed Jeroen Dalsem's excellent beta widget manager to handle the index page and cannot move the widgets because the handles for moving them are obscured by warnings. Unfortunately, index page widget editing is an admin only option :-(

    Jon

     

     

  • http://trac.elgg.org/ticket/4278 is the ticket that includes a link to the code changed in Elgg 1.8.3. You could modify the code to not show the warning when logged in as admin.

  • Btw. do you have displaying of warnings and errors on the screen option enabled? If not, I wonder why the deprecated notices are displayed at all. As I understand it, the change in displaying the notices was to show them only to admin - if the option is enabled at all. If the messages show up while the display option is turned off it seems rather like a new bug to me.

  • For the brave and foolish ;-oO

    Go to Elgg Core
        engine/lib/elgglib.php

    Find this Function :-
        function elgg_deprecated_notice($msg, $dep_version, $backtrace_level = 1)
     
    About 30 lines down Find this Code :-
        if ($visual && elgg_is_admin_logged_in())
        {
            register_error($msg);
        }
     
    Change the Code to :-
        /**if ($visual && elgg_is_admin_logged_in())
        {
            register_error($msg);
        }**/
     
    Done !
     
    Now NOBODY will see the deprecated message displayed on the Browser
    BUT
    The apache error_log will still always have the full message looged in there
     
    *Caveat:-
     
    You the Site Admin are now reponsible  to go read the Log to know 
    whether there are any deprecated messages and go figure 
    which PlugIn is causing the message and try to get the 
    deprecated code on PlugIns fixed - all by yourselves.. ;-)

    The ideal would be to have an Admin Site Setting
    to toggle this display of/off.
    And.. NO - PHP's error display does not control
    the deprecated mesages' display ;-)
    which uses the Elgg register_error() call.

  • Wonderful, thanks! Yes, a toggle would be great. Better still if it made use of the site settings or a similar set of options (maybe one setting for non-admins, another for admins). But this will do nicely for now. 

    As we have over 100 plugins on our site it is perhaps even worth our while building a plugin that can check other plugins for deprecated code (and maybe even fix it).  As the core clearly knows what to look for, presumably something could be made to proactively apply changes, or at least give the old line and suggested new line, with an option to accept or change it. Do you know if anyone has done such a thing? 

    Jon

    ps - there's one possible deprecated message from the core that I don't *think* is a result of a relic of an old installation as I did a fresh install in a clear directory:

    Deprecated in 1.8: The metatags view has been deprecated. Extend page/elements/head instead Called from [#8] <sitepath>/engine/lib/views.php:503

     

  • line 503 of engine/lib/views just pulls a view, which is deprecated, likely a third-party plugin.

     



  • "Wonderful, thanks! "

        you're welcome ;)

    "Yes, a toggle would be great. "

        will be, but does this mean you just volunteered
        do a pull request, code the toggle, push on github ? ;-) ?

    "Better still if it made use of the site settings
    or a similar set of options
    (maybe one setting for non-admins, another for admins). "

        ~ditto~

    "But this will do nicely for now. "

        of course !

    "As we have over 100 plugins on our site it is perhaps "

        over 100 PlugIns geezzz !!!
        u r uno muy loco Elgg-hombre !
        lolz and lolz ;-) but why so many ??
       
    "even worth our while building a plugin that can check other plugins
    for deprecated code (and maybe even fix it).  "

        'worth your yur while' ?
        hmm... sounds definitely like you *are volunteering !
       
    "As the core clearly knows what to look for, "

        so does anyone that can grep for 'elgg_deprecated_notice('
        and then grep for the target texts in found there -
        over the plugins' code folders ;-oO;)

    "presumably something could be made to proactively apply changes,
    or at least give the old line and suggested new line,
    with an option to accept or change it.
    Do you know if anyone has done such a thing? "

        yep !
        it's called a grammar parser for PHP --
        suppose you're ready to toy with LALR grammars,
        lexical analysis, syntax parsing,.. or simply using
        PHP's tokenizer and reflections classe to indentify and
        extract the necessary code involved for the automatic
        PlugIns' code modification with certainty ?

  • I'll fully read this topic after work :) as admin with these messages its just completely wiped me from doing anything on my site other than admin stuff because don't forget I'm a member of my site too! and now I can't work with my community!