-
Notifications
You must be signed in to change notification settings - Fork 585
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
DEVS! HELP US TEST ASAP. #1337
Comments
it says "redux is not defined" on the chrome dev tools javascript console? |
You of all people should know better than to leave one liners that really tell us nothing. |
Heh. More details please? Maybe a config gist? |
Hey kevin, hey dovy, I downloaded the latest version and integrated to my test system, I compared the latest barebone-config.php with my custom config.php, and they were the same except my custom values, I think any of the fields in my config are initializing the "redux" variable (not the "$.redux" one). Here's the error log of mine:
|
Something is off in your files. We don't initialize a $.redux variable now. The redux variable is the localized variable used by all js within Redux. Sounds like you still have old files. ;) |
Ok, I'll try again :) but the variable isn't $.redux, it's only "redux" as 2014-06-11 9:57 GMT+03:00 Dovy Paukstys notifications@github.com:
|
I deleted all the files in the redux admin folder, downloaded the latest ZIP from this repo, unzipped it, I'm using dev mode = true (unminified sources). |
The |
FWIW, if I comment out the line |
I've this problem in my chrome console: Uncaught ReferenceError: redux is not defined field_switch.js?ver=1402483131:13 What appened? Please, fix it fast. It's a BOOM for our code and development. Thanks. |
I can see the |
I changed wp_register_script(
'redux-js',
self::$_url . 'assets/js/redux' . $min . '.js',
$depArray,
filemtime( self::$_dir . 'assets/js/redux' . $min . '.js' ),
-> true
); to false, for letting the script load itself in the head, the problem is gone. But the question is: is it the proper way to solve this ? |
Do me a favour, undo that, and on line 422ish, change
to
I want to see if it makes a difference. |
nope, still has it. |
Hmmm, ok. I'd keep what you've done for now. If Dovy gives it his stamp of approval, I'll make it permanent. The change was all about speed improvement. I don't know if putting all that in the head compromises that. Dovy might tho. :) |
Well, I just read that : registering "redux-js" as a dependency to the field scripts' enqueue lines, is the proper way to solve problems like this. That might change the loading order of "redux-js" in the footer. |
So, that is to say, go into each field's php, add 'redux-js' to the js enqueue's dependency array, so the var redux stuff loads before the field js? That will cause it to load before the field js? |
I got curious about it, and found this post and gave me that idea: |
Can you set the enqueue back to true, and add that dep to one of the fields you are using and see if it works? Thing is, mine is still loading before the field js (trying to figure out why). If it works for you, we might have a proper solution :) |
Yes it worked! The first field loaded and giving error (in my setup) was a media field, I added the "redux-js" dependency to it, and all errors are gone. But we need to apply to all of fields because we won't know which fields will be the first one to load. wp_enqueue_script(
'redux-field-media-js',
ReduxFramework::$_url . 'inc/fields/media/field_media' . Redux_Functions::isMin() . '.js',
array( 'jquery', 'wp-color-picker', 'redux-js' ),
time(),
true
); |
You sir, get the 'Redux contributor of the day' award! I concur, especially since the redux builder allows user to pick and choose their fields now, adding the dep to each one is mandatory. I'll start making changes. Thank you, dude. :D :D :D |
You're welcome :) |
Okay @tpaksu and @gianbalex, I pushed v.3.3.0.6, which adds the redux js dep to every field that requires it. Please let me know if the update works out for each of you. :) |
I think performance has improved now. Checking it further. |
Yes, it's working now @kprovance . |
Awesome. My up at 4 am coz the neighbors dog won't shut up has not been in vain! :) @simrandeep, it's a huge difference. And I run Windows, so to be able to say that is a big deal. ;-) |
Hi Kevin/Dovy, Only issue I've found so far is that upon saving theme options, occasionally the Font Weight / Style in typography field will be removed? Much quicker though, great work!
|
@edcousins, if you want, open a new ticket and include your typography field(s). The new js might be playing havok with it. |
Fixed, I believe. Closing. |
Shit this is fast! I'll get testing, sick! |
Cha-ching, AJ. ::evil grin:: |
@kprovance I'm still facing the issue I'm working on localhost and used plugin As @tpaksu suggested ( #1337 (comment) ). I was made changes on locahost i.e.
and File:
Set My current redux version is - What was the wrong with my current setup. Or any other issue. |
Now, Update it with version |
Hey WordPress devs. As if our last release wasn't enough, I just reduced load time of the panel by up to 300%! I need you to help me test ASAP.
** It's been merged into master **
Grab it. Tell us if you have problems. I don't think you will though. Did I mention, this work will dramatically help us get groups out too? Oh yea. That's forthcoming.
If you can, donate to the effort (https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=N5AD7TSH8YA5U). Some of us have bills to pay and we're spending way too much time making your dev life easier.
Some have asked what we did differently?
We made the JavaScript on-demand. Traditionally we initialized every field in the panel on load. This took a lot of time. Certain JS functions (like the WP color picker, editor, ace_editor, etc) took a LONG time to load. By doing it the way we are, only the fields visible at any time are initialized. As you traverse your panel fields that are newly visible get initialized. In this way you load the full panel without having to launch javascript for fields you never see or use. I think you're users will b every VERY happy.
Please test this hard. Every field. GO!
The text was updated successfully, but these errors were encountered: