J3 Issue ? ? Pending

User tests: Successful: Unsuccessful:

avatar tgv604
tgv604
7 May 2018

…cript declarations

The issue has been described and discussed at
#5933
#2558
joomla/joomla-platform#673

In my case I had a problem with JCE mediabox plugin failing once a page has been cached, due to its init script getting duplicated up to 8 times.

This PR fixes the bugs in two lines that were meant to prevent duplication but the stristr() checks string inclusion in the wrong way: $sdata/$stdata here is the cached script declarations string so it has to be a haystack and be the first argument.

Pull Request for Issue # .

Summary of Changes

Testing Instructions

Expected result

Actual result

Documentation Changes Required

avatar tgv604 tgv604 - open - 7 May 2018
avatar tgv604 tgv604 - change - 7 May 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 May 2018
Category Libraries
avatar infograf768
infograf768 - comment - 7 May 2018

@klas
Can you have a look?

avatar klas
klas - comment - 7 May 2018

Haven't tested, but so what @tgv604 proposes makes sense, newly added script should be needle and what is already in the storage (cache) should be haystack and documentations says that arguments order are stristr ( string $haystack , mixed $needle )

avatar Quy
Quy - comment - 7 May 2018

I have tested this item successfully on eaa0fd2

Tested with JCE Mediabox.

Before PR:

h1, h2, h3, h4, h5, h6, .site-title {
        font-family: 'Open Sans', sans-serif;
}
h1, h2, h3, h4, h5, h6, .site-title {
        font-family: 'Open Sans', sans-serif;
}
JCEMediaBox.init({popup:{width:"",height:"",legacy:0,lightbox:0,shadowbox:0,resize:1,icons:1,overlay:1,overlayopacity:0.8,overlaycolor:"#000000",fadespeed:500,scalespeed:500,hideobjects:0,scrolling:"fixed",close:2,labels:{'close':'Close','next':'Next','previous':'Previous','cancel':'Cancel','numbers':'{$current} of {$total}'},cookie_expiry:"",google_viewer:0},tooltip:{className:"tooltip",opacity:0.8,speed:150,position:"br",offsets:{x: 16, y: 16}},base:"/joomla-cms-staging/",imgpath:"plugins/system/jcemediabox/img",theme:"standard",themecustom:"",themepath:"plugins/system/jcemediabox/themes",mediafallback:0,mediaselector:"audio,video"});

JCEMediaBox.init({popup:{width:"",height:"",legacy:0,lightbox:0,shadowbox:0,resize:1,icons:1,overlay:1,overlayopacity:0.8,overlaycolor:"#000000",fadespeed:500,scalespeed:500,hideobjects:0,scrolling:"fixed",close:2,labels:{'close':'Close','next':'Next','previous':'Previous','cancel':'Cancel','numbers':'{$current} of {$total}'},cookie_expiry:"",google_viewer:0},tooltip:{className:"tooltip",opacity:0.8,speed:150,position:"br",offsets:{x: 16, y: 16}},base:"/joomla-cms-staging/",imgpath:"plugins/system/jcemediabox/img",theme:"standard",themecustom:"",themepath:"plugins/system/jcemediabox/themes",mediafallback:0,mediaselector:"audio,video"});

After PR, no duplicates


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20310.

avatar Quy Quy - test_item - 7 May 2018 - Tested successfully
avatar viocassel
viocassel - comment - 18 May 2019

I have tested this item successfully on eaa0fd2


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20310.

avatar viocassel viocassel - test_item - 18 May 2019 - Tested successfully
avatar Quy Quy - change - 18 May 2019
Status Pending Ready to Commit
avatar Quy
Quy - comment - 18 May 2019

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20310.

avatar HLeithner HLeithner - change - 20 May 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-05-20 10:55:54
Closed_By HLeithner
Labels Added: ?
avatar HLeithner HLeithner - close - 20 May 2019
avatar HLeithner HLeithner - merge - 20 May 2019
avatar HLeithner
HLeithner - comment - 20 May 2019

thx

Add a Comment

Login with GitHub to post a comment