Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wp_localize_script variable lost in minification #28

Closed
lkraav opened this issue Aug 29, 2013 · 4 comments
Closed

wp_localize_script variable lost in minification #28

lkraav opened this issue Aug 29, 2013 · 4 comments

Comments

@lkraav
Copy link

lkraav commented Aug 29, 2013

I'm seeing a variable getting lost (no "/* wp_localize_script($data_handle): */\n" visible in the source, while some others are) and it's killing the whole page's JS.

Investigating further. Opening the issue for some possible early feedback from core devs if this should even be possible, so I'm not chasing ghosts.

@lkraav
Copy link
Author

lkraav commented Aug 29, 2013

At first sight, I'm seeing:

  • $dep = $wp_deps->registered[$new_handle]; has two _WP_Dependency objects with the same "handle" property, but different "extra" property, to work with
  • $dep->add_data( $key, $data ); apparently will end up adding only the last come last serve dependecy extra info, overwriting any earlier "extra"-s

@lkraav
Copy link
Author

lkraav commented Aug 29, 2013

Yes I'm convinced now handle extra data processing is broken when two scripts from a single group include extra data. Only the last one is added by wpdm. Seeing if I can patch this.

lkraav pushed a commit to lkraav/wp-dependency-minification that referenced this issue Aug 29, 2013
@westonruter
Copy link
Contributor

I believe this is the same issue which was reported at http://wordpress.org/support/topic/jqueryjs-generated-css-error

shadyvb pushed a commit to shadyvb/wp-dependency-minification that referenced this issue Sep 9, 2013
westonruter added a commit that referenced this issue Sep 15, 2013
Merge branch 'lkraav-issue-28' into develop

Closes #28
Closes #29
@westonruter
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants