How do you get rid of this warning in 1.8 for older plugins

Deprecated in 1.8: settings/polls/edit was deprecated in favor of plugins/polls/settings 

Hi, I feel a little embarrassed to ask this as I am sure it is very easy to solve. I can fix all the other plugin issues with Elgg okay but I just cannot yet after a few days of using Elgg find out how to stop the above error message from showing.

 

What do I need to do to get rid of it? With all other error messages I can find my way around and change the code but with this one I am stumped. It looks like it is asking me to change the naming convention of the folders and files - is this the case? I did try this but obviously the code inside the files then needs changing to point to the right folders and files and I am wary about doing this.

 

Any help appreciated please.

 

 

  • smayil Khayredinov
    yesterday

    @wwwcjb, removing is not really a solution. 

    Since 1.8, elgg_view_entity_list() accepts an array as a second parameter. So, look up in 1.7 reference what those 0s and 5s stand for and replace them with:

    elgg_view_entity_list($entities, array(
    'limit' => $limit,
    'count' => $count,
    // whatever your values represent 
     ));
     

    My comment to the above: Thank you so much for adding this. I did wonder if it was a little too easy. I have replaced the old code with the above code and everything works. I wouldn't have a clue where to look on Elgg to know what the 0s and 5s were for. Any ideas? I did just try but couldn't see anything specific like a 1.7 guide?

    Thanks again

  • Hi @smayilKhayredinov 

    Can I not just use:

    elgg_view_entity_list($entities, array(

     'limit' => $limit,

     'count' => $count,

     // , 0, 0, 5, false

    ));

     

    ...Using the same 0s and 5s as before with your additional/changed code? Note that )); has to be on a new line or the group page gets broken and messed up (is this right?)

     

     

  • How to solve this
    Deprecated in 1.8: The profile/icon view was deprecated. Use elgg_view_entity_icon() Called from [#9] \static.ak\engine\lib\views.php:503

     

    Script:

    $icon = elgg_view("profile/icon", array('entity' => get_user($friend->guid), 'size' => 'tiny'));

  • @Liang - Do exactly what it says: use elgg_view_entity_icon(). See the docs for the function for more information on its use.

  • helllo, i have a similar problem,i am a newbie to the plugin development..

    Deprecated in 1.8: widgets use content as the display view Called from [#9] C:\xampp\htdocs\int\engine\lib\views.php:506
    I am developing a plugin that seaches through a mysql database and print the result below it. like a search and display below the search result. i need help.. 
  • The name of files inside your widget folder should be edit.php and content.php. Check that. Also if you created the view for widget after enabling the plugin, run the upgrade script from admin panel

  • Maybe more precisely: the file views.php in the the folder mod/your_plugin/views/default/widgets/your_plugin/ needs to be renamed to content.php. The error message should disappear then. Though you might come across other deprecated warnings that are caused by other deprecated functions in the plugin code.

Feedback and Planning

Feedback and Planning

Discussions about the past, present, and future of Elgg and this community site.