BxH5avModule.php loading in template style sheets

I had the customised backgrounds on my profile page to appear only to be replaced with the background loaded in the style sheet.  This puzzled me and so I open firebug to see that yes, the body style was loaded again after the Profile Customizer body style.  Using page view I found where it was loading in the style sheets from the template in the Profile Video block.  I found that one of the videos was not being found by the Profile Videos Block; maybe related to this ticket: http://www.boonex.com/trac/dolphin/ticket/3250; however, that is a different topic.

Continuing, I traced the bug to the BxH5avModule.php file.  It is loading in the style sheets, default, common, and general.  I am guessing that something in those style sheets is needed for the messages but the problem is that by loading those style sheets in a second time, it is overwriting the Profile Customizer styles; not to mentioning wasting browser load times loading in style sheets that have already been loaded.  The HTML5 module should have had style sheets with just the necessary bits instead of loading in the style sheets from the template a second time.

 

            case STATUS_PROCESSING:
                $sOverride = $this->_oTemplate->addCss(array('default.css', 'common.css', 'general.css'), true) . MsgBox(_t('_sys_media_processing'));
                break;
            case STATUS_DISAPPROVED:
                if (!isAdmin()) {
                    $sOverride = $this->_oTemplate->addCss(array('default.css', 'common.css', 'general.css'), true) . MsgBox(_t('_sys_media_disapproved'));
                    break;           
                }

            case STATUS_FAILED:
            default:
                if (!BX_H5AV_FALLBACK || !file_exists($sFilesPath . $iFileId . FLV_EXTENSION))
                    $sOverride = $this->_oTemplate->addCss(array('default.css', 'common.css', 'general.css'), true) . MsgBox(_t('_sys_media_not_found'));
                break;
        }

 

In my case it was the failed that caused my custom background to be overwritten by the Profile Video Block; for some reason that block can not find a video that exisits on the site and can be loaded and played by visiting the particular album.

 

I am not sure why the stylesheets are being loaded in again, perhaps to make sure they are on the page?  At any rate, it is causing a problem with the Profile Customizer and thus needs to be fixed in some manner.

Geeks, making the world a better place
Quote · 21 Feb 2015

Is there a page with the html5 player loaded that does not already have default, common, and general style sheets already loaded?  If not, then I will just change the html5 video module from loading those again and all should be fine.

Geeks, making the world a better place
Quote · 22 Feb 2015

I hope whoever coded this will step in and comment on it.

Geeks, making the world a better place
Quote · 23 Feb 2015

This code is necessary when video player is used in iframe, then css files must be present, but it is necessary for video comments only, regular video module isn't using iframe for video player.

Please try to remove the following code:

 $this->_oTemplate->addCss(array('default.css', 'common.css', 'general.css'), true)

from serviceResponseVideoPlayer function in modules/boonex/html5av/classes/BxH5avModule.php file in three places, so it will look like this:

$sOverride = MsgBox(_t('_sys_media...'));

Please let me know about the result.

Thank you for the report.

Rules → http://www.boonex.com/terms
Quote · 1 Mar 2015
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.