[wp-trac] [WordPress Trac] #31371: wp_enqueue_script doesn't load all scripts due to $concat = str_split( $concat, 128 );

WordPress Trac noreply at wordpress.org
Mon Feb 23 07:13:01 UTC 2015


#31371: wp_enqueue_script doesn't load all scripts due to $concat = str_split(
$concat, 128 );
---------------------------+------------------------
 Reporter:  alturic        |       Owner:
     Type:  defect (bug)   |      Status:  closed
 Priority:  normal         |   Milestone:
Component:  Script Loader  |     Version:  4.1
 Severity:  normal         |  Resolution:  duplicate
 Keywords:                 |     Focuses:
---------------------------+------------------------
Changes (by SergeyBiryukov):

 * status:  new => closed
 * resolution:   => duplicate
 * milestone:  Awaiting Review =>


Old description:

> So, I came across this ticket that was marked Closed and I'm unsure what
> me reopening it will actually do hence I'm making this ticket for
> WordPress 4.1 but the "issue" still remains.
>
> https://core.trac.wordpress.org/ticket/26886
>
> Either way the "problem" comes when the Query Params reach 128 chars, and
> I don't really want to just edit a WP Core file for multiple reasons BUT
> I fix it by simply changing
>
> {{{
> $concat = str_split( $concat, 128 );
> }}}
>
> to
>
> {{{
> $concat = str_split( $concat, 3000 );
> }}}
>
> and everything seems to work fine, all the scripts now load, etc. I don't
> have the problem anymore or anything but a.) it's editing a core file
> (blah) and b.) I'm unsure what all can happen by simply doing that.
>
> For reference, here's some screenshots showing what was happening:
>
> http://i.imgur.com/3Gz3lTL.png
>
> http://i.imgur.com/thRlvXI.png

New description:

 So, I came across this ticket that was marked Closed and I'm unsure what
 me reopening it will actually do hence I'm making this ticket for
 WordPress 4.1 but the "issue" still remains.

 #26886

 Either way the "problem" comes when the Query Params reach 128 chars, and
 I don't really want to just edit a WP Core file for multiple reasons BUT I
 fix it by simply changing

 {{{
 $concat = str_split( $concat, 128 );
 }}}

 to

 {{{
 $concat = str_split( $concat, 3000 );
 }}}

 and everything seems to work fine, all the scripts now load, etc. I don't
 have the problem anymore or anything but a.) it's editing a core file
 (blah) and b.) I'm unsure what all can happen by simply doing that.

 For reference, here's some screenshots showing what was happening:

 http://i.imgur.com/3Gz3lTL.png

 http://i.imgur.com/thRlvXI.png

--

Comment:

 As noted in comment:5:ticket:26886 and comment:11:ticket:26886, the string
 is merged back together before being split by commas and processed, so the
 128 character limit shouldn't make a difference.

 Let's continue the discussion in #26886.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31371#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list