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

Error in the asset path: jquery-ui-timepicker.js causing an errors #124

Closed
ghost opened this issue Jul 9, 2015 · 8 comments
Closed

Error in the asset path: jquery-ui-timepicker.js causing an errors #124

ghost opened this issue Jul 9, 2015 · 8 comments

Comments

@ghost
Copy link

ghost commented Jul 9, 2015

The frontend app don't stops "loading" if you try to go to the "accounts" or "contacts" or somewhere else. Looks like because of the app trying to load the timepicker script by the path: "{my_app_domain}/bundles/jquery-ui-timepicker.js" which is not exists.

OroCrm: 1.7.4 (though ver. 1.7 - the same bug)
Just installed app through "oro:install" with no sample data.
PHP: 5.5.9 + FPM + Nginx 1.4.6
Browser: Chrome 43.0.2357.132 (64-bit)

@dxops
Copy link
Member

dxops commented Jul 10, 2015

Hi, @mikemirten !

Please run php app/console assets:install --symlink --env=prod

@Grygir
Copy link
Contributor

Grygir commented Jul 10, 2015

Hi, @mikemirten

In version 1.7.0 was removed support of jquery-ui-timepicker (was used in 1.6.* and earlier). So it is correct that file does not exist.

It is looks like you have some customization that requires this library. Please do file search for phrase "jquery-ui-timepicker" to find which module requires it.

@ghost
Copy link
Author

ghost commented Jul 10, 2015

The assets anyway has been installed by the ORO installer. For me the path looks quite suspicious: "bundles/jquery-ui-timepicker.js". The assets is usually allocated inside of a certain bundle's directory, but not inside of the "/bundles" itself.

In the 1.6.* there is no errors. I have no customizations. As I've mentioned about it in the bug report, i have just installed 1.7.4.

The script trying to be loaded by the require.js. The console says:

GET http://{my_domain}/bundles/jquery-ui-timepicker.js require.js:1903
Uncaught Error: Script error for: jquery-ui-timepicker require.js:166

@Grygir
Copy link
Contributor

Grygir commented Jul 10, 2015

In version 1.7.4 there's no any mention of "jquery-ui-timepicker" (I've just checked)

Please do file search in your local code for phrase "jquery-ui-timepicker" to find which module requires it.

Also if you just upgraded your instance from 1.6.* to 1.7.4, this issue might caused by browsers cache (Ctrl+F5).

Just for incase, execute composer update. If there's some modules update, especially:

  - Removing oro/platform (1.6.3)
  - Installing oro/platform (1.7.4)
    Downloading: 100%         

  - Removing oro/crm (1.6.3)
  - Installing oro/crm (1.7.4)
    Downloading: 100%  

Then execute php app/console oro:platform:update, otherwise execute:

php app/console cache:clear --env=prod
php app/console assets:install
php app/console assetic:dump
php app/console oro:requirejs:build
Ctrl+F5

@ghost
Copy link
Author

ghost commented Jul 10, 2015

I've searched for the "jquery-ui-timepicker" immediately after the problem appeared and found nothing. Probably it's a dependency of some other script.

It wasn't an upgrade, but a new installation. And off course i've tried to refresh the page through Ctrl+F5.

Done exactly as you said: updated the composer and executed the commands and the Ctrl+F5. Though the oro:platform:update runs the assets:install, assetic:dump and oro:requirejs:build.
No changes, the error is still remains...

Then i've cleared the whole browser's cache and... the problem is disappeared. So there is no use of Ctrl+F5 in this case. Looks like the only thing can help is to use the versioned assets.

Thank you a lot for your time.

Though one more problem is still remains:
As i can understand, the "oro.min.js" is an assembly of the scripts using in the project. But in my case the project is still loading the scripts separately instead of load the assembly.

@Grygir
Copy link
Contributor

Grygir commented Jul 10, 2015

Looks like the only thing can help is to use the versioned assets.

Yes, we are going to fix that.

the "oro.min.js" is an assembly of the scripts using in the project. But in my case the project is still loading the scripts separately instead of load the assembly.

oro.min.js is used only for prod mode. If you are opening in dev mode (http://{yourhost}/app_dev.php/) -- all scripts are loaded as they are.

Couple moments:

  1. in prod mode scripts might be loaded separately if oro.min.js is not accessible (does not exist, or web server has no permission to open the file)
  2. not all JS-files get in to oro.min.js, so that's okay if there are some other JS-files loaded beside oro.min.js.

@ghost
Copy link
Author

ghost commented Jul 10, 2015

Checked it in the prod mode - yes, the oro.min.js is works fine now.
Thank you.

@Grygir Grygir closed this as completed Jul 10, 2015
@wnasich
Copy link

wnasich commented Sep 8, 2015

I solved this issue just by clearing browser cache. If you are working on chrome: after opening up the developer tools (usually by pressing F12) Click + Hold on the "Reload Page" button. From the popup list, choose "Empty Cache and Hard Reload".

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

No branches or pull requests

3 participants