The RSS feed URL is deprecated

We had a google news deshlet for accounts module using code given in https://github.com/hectorrios/sugarcrm-news-dashlet

But now it shows an error message "This RSS feed URL is deprecated
This RSS feed URL is deprecated, please update. New URLs can be found in the footers at https://news.google.com/news.
"

Any knows how to make this error message disappear?

  • From the 7.8 release notes at http://support.sugarcrm.com/Documentation/Sugar_Versions/7.8/Pro/Sugar_7.8.0.0_Release_Notes/ 

     

    • The Sidecar NewsView which was used for the News dashlet has been removed after previously being disabled and deprecated in Sugar 7.7.2.0. The ./clients/base/views/news/ directory was removed. Any remaining News dashlets appearing on user dashboards will be removed during upgrade."

    HTH

    FrancescaS

  • Hi Francesca,

    Thanks for your response. Now what is the workaround possible? Any idea how can we make the error message disappear?
    It's fine if we need to rewrite everything but this deshlet was very important for our client.

  • Hi Francesca Shiekh

    Thanks for your response. Now what is the workaround possible? Any idea how can we make the error message disappear?
    It's fine if we need to rewrite everything(the code) but this deshlet was very important for our client.

  • I'm sorry but I'm not the right person to answer that, we've never used the news dashlet.

    You could try seeing if copying the old news view as a custom view solves your issue, the view's metadata and controller can be found at the link below, though you'll probably need to find the hbs files for that view as well:

    http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.9/User_Interface/Dashlets/#Dashlet_Exa… 

    you should be able to create a custom/clients/base/views/news/ directory and copy the original news view there.

    From an old backup of mine

    clients/base/views/news/news.hbs

    {{!--
    /*
    * Your installation or use of this SugarCRM file is subject to the applicable
    * terms available at
    * support.sugarcrm.com/.../.
    * If you do not agree to all of the applicable terms or do not have the
    * authority to bind the entity as an authorized representative, then do not
    * install or use this SugarCRM file.
    *
    * Copyright (C) SugarCRM Inc. All rights reserved.
    */
    --}}
    {{#if responseData.results}}
    {{#each responseData.results}}
        <div class="news-article">
            <h5><a href="{{this.unescapedUrl}}">{{{this.titleNoFormatting}}}</a>
            </h5> ({{{this.publisher}}})
            <p>{{{this.content}}}</p>
        </div>
    {{/each}}
    {{else}}
        <div class="block-footer">{{str "LBL_NO_DATA_AVAILABLE"}}</div>
    {{/if}}

    clients/base/views/news/dashlet-config.hbs

    {{!--
    /*
    * Your installation or use of this SugarCRM file is subject to the applicable
    * terms available at
    * support.sugarcrm.com/.../.
    * If you do not agree to all of the applicable terms or do not have the
    * authority to bind the entity as an authorized representative, then do not
    * install or use this SugarCRM file.
    *
    * Copyright (C) SugarCRM Inc. All rights reserved.
    */
    --}}
    <div class="record">
        {{#each dashletConfig.config.fields}}
            <div class="row-fluid panel_body">
                <div class="record-cell">
                    <div class="record-label">{{str label}}</div>
                    {{field ../this model=../this.settings template=../this.action}}
                </div>
            </div>
        {{/each}}
    </div>

    clients/base/views/news/news.js

    /*
    * Your installation or use of this SugarCRM file is subject to the applicable
    * terms available at
    * http://support.sugarcrm.com/06_Customer_Center/10_Master_Subscription_Agreements/.
    * If you do not agree to all of the applicable terms or do not have the
    * authority to bind the entity as an authorized representative, then do not
    * install or use this SugarCRM file.
    *
    * Copyright (C) SugarCRM Inc. All rights reserved.
    */

    /**
    * @class View.Views.Base.NewsView
    * @alias SUGAR.App.view.views.BaseNewsView
    * @extends View.View
    * @deprecated Since 7.7.2. Will be removed in 7.8.
    */

    ({
        plugins: ['Dashlet'],

        initialize: function(options) {
            this._super('initialize', [options]);
            app.logger.warn('View.Views.Base.NewsView is deprecated since 7.7.2. Will be removed in 7.8.');
        },

        initDashlet: function() {
            if(this.meta.config) {
                var limit = this.settings.get("limit") || "5";
                this.settings.set("limit", limit);
            }
            this.model.on("change:name", this.loadData, this);
        },
        loadData: function (options) {
            var name, limit;

            if(_.isUndefined(this.model)){
                return;
            }
            var name = this.model.get("account_name") || this.model.get('name') || this.model.get('full_name'),
                limit = parseInt(this.settings.get('limit') || 5, 10);
            if (_.isEmpty(name)) {
                return;
            }
            $.ajax({
                url: 'https://ajax.googleapis.com/ajax/services/search/news?v=1.0&q=' +
                    name.toLowerCase() + '&rsz=' + limit,
                dataType: 'jsonp',
                success: function (data) {
                    if (this.disposed) {
                        return;
                    }
                    _.extend(this, data);
                    this.render();
                },
                context: this,
                complete: options ? options.complete : null
            });
        }
    })

    clients/base/views/news/news.php

    <?php

    /*
    * Your installation or use of this SugarCRM file is subject to the applicable
    * terms available at
    * support.sugarcrm.com/.../.
    * If you do not agree to all of the applicable terms or do not have the
    * authority to bind the entity as an authorized representative, then do not
    * install or use this SugarCRM file.
    *
    * Copyright (C) SugarCRM Inc. All rights reserved.
    */

    $viewdefs['base']['view']['news'] = array(
        'dashlets' => array(
        ),
        'config' => array(
            'fields' => array(
                array(
                    'name' => 'limit',
                    'label' => 'LBL_DASHLET_CONFIGURE_DISPLAY_ROWS',
                    'type' => 'enum',
                    'searchBarThreshold' => -1,
                    'options' => array(
                        1 => 1,
                        2 => 2,
                        3 => 3,
                        4 => 4,
                        5 => 5,
                        6 => 6,
                        7 => 7,
                        8 => 8,
                    ),
                ),
            ),
        ),
    );

    Clearly, this makes assumptions about css classes being available etc, so take it with a grain of salt.

    You will want to remove the deprecated warning from your controller, and make sure that the ajax for the google api is still good.

    Having said all this, there must be a reason why SugarCRM development decided to remove this, so again, take it all with a grain of salt.

    HTH,

    FrancescaS