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.

 

 

  • Yes this notice is telling you that the view has been deprecated - luckily the view is for the plugin settings form which most likely doesn't interact with any other file that you would have to edit.

    Try simply copying the contents of polls/views/default/settings/polls/edit.php to polls/views/default/plugins/polls/settings.php and deleting the original file.

    (keep a copy just in case...)

  • OMG! "Wood for trees". Of course. Thank you so much I appreciate the time you took to answer this. Thank you. LOL! :))

    *It worked a treat - thanks: For future reference you must also remember to deactivate and activate the plugin to make the folder changes work.

     

  • Hey, I actually have a similar problem. Do you have any advice for what to do to get rid of the error:

    Deprecated in 1.8: The metatags view has been deprecated. Extend page/elements/head instead Called from [#6] /[directory]/engine/lib/views.php:503?

    I've tried looking around in the Elgg documentation and in plugins similar to the one I'm trying to modify, but I still can't figure out exactly what I should do. :P

  • In Elgg 1.7, you could add additional elements to <head> by extending 'metadata' view, so it would look like:

    elgg_extend_view('metadata', 'my/view');

     

    In Elgg 1.8, the structure changed, so now you can extend the head view directly:

    elgg_extend_view('page/elements/head', 'my/view');

  • ...well, that was simple. Thank you so much for your help! That error was driving me crazy, lol. =)

  • Just when I thought I got it I can't solve this one ;)

    Deprecated in 1.8: widgets use content as the display view

    How do I get rid of this one?

    Is the "widgets" a name of a folder in my main theme? It shows on the admin's profile page when adding a widget.

    It may be simple but after 12 hours of other coding I have now hit a wall.

     

  • Some deprecated notices are really hard to understand. The "widgets use content..."-message was the worst I came across so far. It took me a while to understand that "content" simply refers to the name of the view/file name. You should be able to solve it by rename view.php to content.php in your plugin's view widget folder.

  • Very kind to answer. Thank you.

    For those who may read this in future here are the key steps I took to solve it:

    1. The error message - Deprecated in 1.8: widgets use content as the display view - was showing in the admin profile page when the "EMBED VIDEO" plugin widget was added to the sidebar 

    2. I didn't make the connection with the error until now - but please always note if the error appears due to a widget being added to the sidebar - I thought it was a global error but in this case it was caused by the "EMBED VIDEO" plugin widget.

    3. Go to your Root Directory folders and look for the MOD folder under the Elgg installation where your site name is - eg. MOD with a www.sitename.com domain name (check your domain URL to see how yours is) would be directly in the public_html folder and nothing else. MOD with a www.sitename.com/jokes domain name would be found by clicking through both the public_html and jokes folders.

    4. Find the plugin folder - in this case it is called EMBED VIDEO

    5. Click through folders: embed video / views / default / widgets / embed_video / view.php

    6. As @iionly kindly says, change the "view.php" file to the new name of "content.php"

    7. IMPORTANT! Now if you haven't already done so TURN OFF THE PLUGIN in the administration Plugins page and FLUSH THE CACHE from the administer control panel dashboard - TURN THE PLUGIN BACK ON - AND REFRESH THE BROWSER PAGE. You should now be able to view the admin profile page without this warning.

    image 

  • Awesome...   nice one guys you just stopped me from pulling what was left of my hair out. I'm now going to 'try' to update a heap of plugins for 1.8.3 from the 1.7.x list and uplaod them for others.

  • would somebody be so kind as to help me out with these errors?

    Deprecated in 1.8: The use of unlimited optional string arguments in elgg_view_layout() was deprecated in favor of an options array Called from [#5] /home/sites/cunctus.co.uk/public_html/dev-site/site/mod/socialcommerce/all.php:101
    Deprecated in 1.8: page_draw() was deprecated in favor of elgg_view_page() in 1.8. Called from [#5] /home/sites/cunctus.co.uk/public_html/dev-site/site/mod/socialcommerce/all.php:104
    when i change page_draw with elgg_view_page i get a page not found response
    I'm by no means a coder but i am trying to update this plugin (and others; all will be shared back...) I have other plugins I have managed to fix/update and will be uploading them shortly.
    I'm trying to update socialcommerce for 1.8.3
    thanks in advance
    regards
Feedback and Planning

Feedback and Planning

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