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

Upgrading from 5.1 to 5.2 produces multiple errors in field labels. #1500

Closed
J-Wick4 opened this issue Oct 20, 2022 · 24 comments
Closed

Upgrading from 5.1 to 5.2 produces multiple errors in field labels. #1500

J-Wick4 opened this issue Oct 20, 2022 · 24 comments
Labels
5x Issues related to OrangeHRM 5.x versions bug

Comments

@J-Wick4
Copy link

J-Wick4 commented Oct 20, 2022

I just upgraded, and most of the site is missing proper field labels.

Screen Shot 2022-10-19 at 7 30 04 PM

Unpacked the 5.2 folder, ran the wizard, selected upgrade from 5.1, and had all great checkmarks system check.

@cholloSalvador
Copy link

Same issue.

@RajithaKumara RajithaKumara added the 5x Issues related to OrangeHRM 5.x versions label Oct 21, 2022
@RajithaKumara
Copy link
Member

Hi @J-Wick4 ,
Did you unpacked OrangeHRM 5.2 into old OrangeHRM 5.1 folder?
When upgrading it's recommended to backup and delete old version codebase and place new codebase in that location. Otherwise some files may conflicted. I guess here cache folder got conflicted with old cache folder.

There is a simple solution, can you run below command at the root of the orangehrm codebase;

php bin/console cache:clear

@J-Wick4
Copy link
Author

J-Wick4 commented Oct 21, 2022

Hey @RajithaKumara, Yes, that's how I did the upgrade, using the new unpacked folder. I'll give it another try tomorrow and run your command. Thank you.

@cholloSalvador
Copy link

How to run command?

@RajithaKumara
Copy link
Member

Hi @cholloSalvador ,
if you are the server administrator, login/ssh to the server. And locate the orangehrm application directory.

cd /path/to/orangehrm
php bin/console cache:clear

@cholloSalvador
Copy link

sorry I dont have any idea. Can you share me a sample video? Thanks

@salmansiddiqui17
Copy link

I also tried a fresh installation but faced the same issue. I guess it's a bug.

@salmansiddiqui17
Copy link

I executed php bin/console cache:clear but still same issue

image

@RajithaKumara
Copy link
Member

RajithaKumara commented Oct 25, 2022

Hi @salmansiddiqui17 ,
is it possible you to open developer tool network tab and provide more info like below screenshot;

Note
I reproduce this by revoking write permission to src/cache directory

Screenshot from 2022-10-25 19-50-21

@salmansiddiqui17
Copy link

salmansiddiqui17 commented Oct 26, 2022

@RajithaKumara Response is empty but status code is 304 not modified

Note: I have 777 permission on set on src folder

image

image

@Super-Chama
Copy link
Member

Hi @salmansiddiqui17 It looks like the response is fine. Can you change the language to English US (if not already) then check and using the developer tools, please confirm any console logs are displayed.

  1. Change Language to English US

    • Navigate to Admin -> Configuration -> Localization.
    • Change Language drop-down to "English (United States)".
    • Click Save.
    • Check if problem is resolved.
      image
  2. Confirm No Error Logs

    • After page is fully loaded press Ctrl + Shift + I to Open browser developer tools.
    • Select Console tab
    • Check if any errors are present.
      image

@pbaranski
Copy link

Hi, having the same problem.
When loading in incognito first time it is ok. When reloading then bug appear.
When local storage in browser is removed an reload applied then site looks fine until next request.
This is server installation - locally it works fine. Guess some server dependencies.

@Super-Chama
Copy link
Member

@pbaranski sorry to hear that. Language strings are cached in local storage from first request onwards. please check if your browser supports/allow local storage (by default this is enabled in chrome/firefox/safari) also additional information such as console logs and browser type,version is appreciated.

@pbaranski
Copy link

@Super-Chama
Browsers are OK - tested on clean Chrome installation.
Looks like hit to local storage is somehow broken

@salmansiddiqui17 @J-Wick4 @cholloSalvador
Quick fix for that problem is turning off redirection:
modify app file: \src\plugins\orangehrmI18NPlugin\Controller\I18NMessagesController.php
comment if lines (add //) like below:

        // if (!$response->isNotModified($request)) {
            $response->setContent($this->getI18NService()->getTranslationMessagesAsJsonString($locale));
            $this->setCommonHeaders($response, 'application/json');
        // }

@salmansiddiqui17
Copy link

@pbaranski localization language is already English (US). Here is the SS of the Console

image

@salmansiddiqui17
Copy link

@pbaranski Thanks I'll try that.

@pbaranski
Copy link

@pbaranski localization language is already English (US). Here is the SS of the Console

image

I think this was addressed to @Super-Chama

@SupperDog
Copy link

@Super-Chama Browsers are OK - tested on clean Chrome installation. Looks like hit to local storage is somehow broken

@salmansiddiqui17 @J-Wick4 @cholloSalvador Quick fix for that problem is turning off redirection: modify app file: \src\plugins\orangehrmI18NPlugin\Controller\I18NMessagesController.php comment if lines (add //) like below:

        // if (!$response->isNotModified($request)) {
            $response->setContent($this->getI18NService()->getTranslationMessagesAsJsonString($locale));
            $this->setCommonHeaders($response, 'application/json');
        // }

This fix doesn't work for me.

@kdy294
Copy link

kdy294 commented Nov 21, 2022

Yeah I’m experiencing the same issue. It was a fresh install and everything was good to go. Just labels not appearing correctly or button labels.

@mleader1
Copy link

mleader1 commented Nov 25, 2022

It turned out the value stored in localStorage in browsers are having some issues @SupperDog

I solve it temporarily using the code below by appending into /web/dist/js/app.js


function languageFix() {
window.localStorage.setItem('"/RveX7hH7+0PZ5+FUVr/pX4WeN/w5Dn7zeeOwHWp+tA="', window.localStorage.getItem('W/"/RveX7hH7+0PZ5+FUVr/pX4WeN/w5Dn7zeeOwHWp+tA="'));
window.localStorage.setItem('core/i18n/messages','"/RveX7hH7+0PZ5+FUVr/pX4WeN/w5Dn7zeeOwHWp+tA="');
}

setTimeout(languageFix, 500);

It works neatly so far. I'm first timer in using OrageHRM, can't wait for for the proper fix and more feature releases!

Cheers

@joelicatajr
Copy link

@Super-Chama Browsers are OK - tested on clean Chrome installation. Looks like hit to local storage is somehow broken
@salmansiddiqui17 @J-Wick4 @cholloSalvador Quick fix for that problem is turning off redirection: modify app file: \src\plugins\orangehrmI18NPlugin\Controller\I18NMessagesController.php comment if lines (add //) like below:

        // if (!$response->isNotModified($request)) {
            $response->setContent($this->getI18NService()->getTranslationMessagesAsJsonString($locale));
            $this->setCommonHeaders($response, 'application/json');
        // }

This fix doesn't work for me.

I am experiencing the same issue. New clean installation. This fix also doesn't work for me.

Thanks for your help with this one.

@joelicatajr
Copy link

Just a FYI for anyone else experiencing this problem. I wiped my install and deployed with 5.1 instead of 5.2 to resolve my issue since there doesn't appear to be a conclusive working fix I could find for 5.2.

@RajithaKumara
Copy link
Member

This issue was fixed in OrangeHRM 5.3. Get the latest build here.

@J-Wick4
Copy link
Author

J-Wick4 commented Feb 14, 2023

Everything is working for me now, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5x Issues related to OrangeHRM 5.x versions bug
Projects
None yet
Development

No branches or pull requests

10 participants