jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.5k stars 4.02k forks source link

React: wrong labels in Account menu when signed in #20361

Closed moritzreiter closed 9 months ago

moritzreiter commented 1 year ago
Overview of the issue

The Account menu shows wrong labels for the first two items when logged in. They say Sign in and Register (as if not being signed in) but they should actually say Settings and Password.

Interestingly, after switching the language, the correct labels get displayed, but then, when reloading the page via the browser, the incorrect labels get displayed again.

Here's a video to illustrate the behavior more clearly: jhipster-react-bug

I see this behavior in a newly generated monolith with React frontend without making any changes to the code.

Motivation for or Use Case

The menu should always display the correct labels.

Reproduce the error

Generate a monolith with React frontend, sign in and look at the labels in the Account menu.

Related issues

Didn't find any.

Suggest a Fix

I guess it's probably a problem in the React code for the Account menu (src/main/webapp/app/shared/layout/menus/account.tsx), that's all I can say right now.

JHipster Version(s)

Most recent stable release: 7.9.3.

JHipster configuration
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "monolith",
    "authenticationType": "jwt",
    "baseName": "rdm",
    "blueprints": [],
    "buildTool": "gradle",
    "cacheProvider": "ehcache",
    "clientFramework": "react",
    "clientPackageManager": "npm",
    "clientTheme": "solar",
    "clientThemeVariant": "dark",
    "creationTimestamp": 1668585284659,
    "cypressAudit": true,
    "cypressCoverage": null,
    "databaseType": "sql",
    "devDatabaseType": "postgresql",
    "devServerPort": 9060,
    "dtoSuffix": "DTO",
    "enableGradleEnterprise": false,
    "enableHibernateCache": true,
    "enableSwaggerCodegen": true,
    "enableTranslation": true,
    "entitySuffix": "",
    "jhiPrefix": "jhi",
    "jhipsterVersion": "7.9.3",
    "jwtSecretKey": "YourJWTSecretKeyWasReplacedByThisMeaninglessTextByTheJHipsterInfoCommandForObviousSecurityReasons",
    "languages": ["en", "de"],
    "messageBroker": false,
    "microfrontend": false,
    "microfrontends": [],
    "nativeLanguage": "en",
    "otherModules": [],
    "packageName": "com.foo.rdm",
    "pages": [],
    "prodDatabaseType": "postgresql",
    "reactive": false,
    "searchEngine": false,
    "serverPort": "8080",
    "serverSideOptions": ["enableSwaggerCodegen:true"],
    "serviceDiscoveryType": "no",
    "skipCheckLengthOfIdentifier": false,
    "skipClient": false,
    "skipFakeData": false,
    "skipUserManagement": false,
    "testFrameworks": ["cypress"],
    "websocket": false,
    "withAdminUi": true
  }
}

Entity configuration(s) entityName.json files generated in the .jhipster directory

No Entities generated.

Browsers and Operating System
qmonmert commented 9 months ago

This bug was fixed since few months I think.

I don't reproduce

cc @DanielFran @mshima