Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-1170

Flashed messages queued for display may throw exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.1.0
    • Fix Version/s: 3.2.0-b2
    • Component/s: Plugins
    • Labels:
      None

      Description

      In the event that a flashed message is stored within the user's session, but the user accesses a plugin URI and that plugin does not support displaying messages on its own, an error is thrown as the view does not exist.

      To resolve, AppController must fall back to display messages through the main interface if the plugin does not support this capability.

      Originally reported in the forums.

        Activity

        admin Paul Phillips created issue -
        Hide
        cody Cody Phillips (Inactive) added a comment -

        Steps to duplicate:

        1. Login as staff
        2. Manage feed reader plugin to remove all RSS feeds
        3. Manage feed reader widget to remove all RSS feeds
        4. Reload URL displayed in browser (... /admin/widget/feed_reader/admin_main/index/1/)
        Show
        cody Cody Phillips (Inactive) added a comment - Steps to duplicate: Login as staff Manage feed reader plugin to remove all RSS feeds Manage feed reader widget to remove all RSS feeds Reload URL displayed in browser (... /admin/widget/feed_reader/admin_main/index/1/)
        Hide
        cody Cody Phillips (Inactive) added a comment -

        What appears to happen in some cases (not sure exactly how yet), a success message ("Feed was successfully removed") is flashed for the next URI, but when the widget is reloaded via the browser (/admin/widget/feed_reader/admin_main/index/1/), the feed reader inherits from AppController which attempts to set the success message within the context of the feed reader, but the feed reader is not equipped to handle the message so an error is thrown.

        Likely solution is to ensure that AppController:setMessage() falls back to rendering message as if $in_current_view was set to false.

        Show
        cody Cody Phillips (Inactive) added a comment - What appears to happen in some cases (not sure exactly how yet), a success message ("Feed was successfully removed") is flashed for the next URI, but when the widget is reloaded via the browser (/admin/widget/feed_reader/admin_main/index/1/), the feed reader inherits from AppController which attempts to set the success message within the context of the feed reader, but the feed reader is not equipped to handle the message so an error is thrown. Likely solution is to ensure that AppController:setMessage() falls back to rendering message as if $in_current_view was set to false.
        cody Cody Phillips (Inactive) made changes -
        Field Original Value New Value
        Summary Feed Reader: May be including message.pdt when removing feeds using the wrong path Flashed messages queued for display may throw exception
        Description Please see http://www.blesta.com/forums/index.php?/topic/2474-critical-error-if-staff-member-deletes-blestas-rss-feader/

        In one example for the demo, the following error was presented:

        Files does not exist: /home/demo/public_html/plugins/cms/views/client/default/message.pdt on line 120 in /home/demo/public_html/lib/view.php

        However, the path should not include "client" after views before default. It may be trying to include this file using the wrong path.
        In the event that a flashed message is stored within the user's session, but the user accesses a plugin URI and that plugin does not support displaying messages on its own, an error is thrown as the view does not exist.

        To resolve, AppController must fall back to display messages through the main interface if the plugin does not support this capability.

        Originally reported [in the forums|http://www.blesta.com/forums/index.php?/topic/2474-critical-error-if-staff-member-deletes-blestas-rss-feader/].
        cody Cody Phillips (Inactive) made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        tyson Tyson Phillips (Inactive) made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            cody Cody Phillips (Inactive)
            Reporter:
            admin Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              2/May/14