Deprecated in 1.7: extend_view() was deprecated by elgg_extend_view()!

Hi everyone.

I'm getting this error on my elgg install :

Deprecated in 1.7: extend_view() was deprecated by elgg_extend_view()!

 

It can appear while posting, or even refreshing, but not always. The site worked like 3 monthes without having this once, and now this error message pop sometimes.

Can someone help me ?

  • Excuse my ignorance but what is a locale ?

    And How do I run these lines ? By ftp ?

  • No need to do this--I confirmed it is a bug in core: http://trac.elgg.org/ticket/2749

    To answer the question, a locale tells PHP how to format strings like numbers, currency, and dates.  We use a dot for a decimal point and a comma for the thousands separator in the US: 3.14159, 1,701, 1.7, etc.  Your locale reverses this: 3,14159, 1.701, 1,7.  The comma is confusing the comparison in PHP somewhere, probably because it's looking at them as strings instead of numbers.

    To put this on your server, you'd copy and paste the lines into a PHP file on your server.  There needs to be a <?php at the start of the file.  You can FTP them or edit them directly on the server.

  • just change every instance of extend_view() to elgg_extend_view().I guess it should work coz it worked in my case albeit the opposite case.I run a old version of elgg and I had a new plugin which used a function called elgg_view_friendly_time(),I changed it to friendly_time() and it worked fine.

    If you use Linux or run cygwin on Windows searching is very easy

    just type

    find . -name "*.*"  |  xargs grep "extend_view()" to find all the instances.Run this at any directory you wish and it will search the directory as well as the sub directory.

    if you want the script

    !/bin/bash
    #change the path according to your wish

    startdirectory="/home/something/elgg/mod"
    searchterm="extend_view()"
    replaceterm="elgg_extend_view()"

            for file in $(grep -l -R $searchterm $startdirectory)
              do
               sed -e "s/$searchterm/$replaceterm/ig" $file > /tmp/tempfile.tmp
               mv /tmp/tempfile.tmp $file
               echo "Modified: " $file
            done

    echo " Changes Done"

  • Thx for the answers ! 

    So, since this is a core pb, I will only have tu upgrade to 1.7.6 and it will be solved right ?

     

    (Mine is 1.7.5, but it seems 1.7.6 is already out, will it be fixed in 1.7.7 or does 1.7.6 fixes it ?)

  • Can someone answer this please ?

  • This was reported after 1.7.6 was released so it will be in 1.7.7.  If you look at the trac ticket I linked to, the "milestone" tells you which version it's scheduled to be in.

  • Hi, I am having the same issue with the version 1.7.8, I guess more of the modules I am using are out of day, 
    I am new workin with elgg, so you guys can recomend me a version which most of the plugins are available?
     

  • @Andres: if you start a fresh site, you should use the latest stable release of Elgg (currently 1.7.10). If a plugin is not compatible because it hasn't been updated yet to work with Elgg 1.7, it most likely will never get upgraded anymore anyway. So, you should rather avoid using such a plugin. But most important plugins will work with Elgg 1.7. You can check when the last version of a plugin was released on the plugin download pages. Roughly 1 - 1,5 years is the timeframe a plugin should be last upgraded to work with Elgg 1.7 (there are older plugins that work with 1.7 without problems but you would need to test this best on a test installation before using it on a productive site.

  • I have this error report aftrer enabling plugins upon upgrading from 1.7.6 to 1.8.0.1.How do I upgrade the plugins to work