williamWEWEevan opened a new issue, #8599:
URL: https://github.com/apache/hop/issues/8599

   ### Apache Hop version?
   
   2.20
   
   ### Java version?
   
   21
   
   ### Operating system
   
   Windows
   
   ### What happened?
   
   **Bug Description:**
   When adding an In Folder Project from an active project, and the user 
browses to a path that contains the PATH from `standardProjectsFolder` in 
`hop-config.json`, the `standardProjectsFolder` part of the path becomes the 
`${PROJECT_HOME}` variable, making the project unable to open.
   
   **Steps to replicate:**
   1. Check the path in `standardProjectsFolder` in `hop-config.json`
   2. Add or edit an existing project
   3. Browse to the Home folder and set it to a folder that contains 
`standardProjectsFolder` (ex. `standardProjectsFolder` = 
`C:\Users\USER\Documents\Hop`, Home folder = 
`C:\Users\USER\Documents\Hop/project_name`)
   4. The `standardProjectsFolder` path in the Home folder field will become 
`${PROJECT_HOME}` (ex. `${PROJECT_HOME}/project_name`)
   
   **Images of the steps:**
   The `standardProjectsFolder` in my active `hop-config` is 
`C:\Users\USER\Documents\Hop`
   
   <img width="901" height="407" alt="Image" 
src="https://github.com/user-attachments/assets/3dce2146-e43b-4917-8b4a-e0731cae1a25";
 />
   
   <img width="530" height="561" alt="Image" 
src="https://github.com/user-attachments/assets/d4516330-64fb-43bb-9642-790021f1e33a";
 />
   
   <img width="888" height="397" alt="Image" 
src="https://github.com/user-attachments/assets/24540789-16cc-4dd2-a92c-1f6fc11408a6";
 />
   
   <img width="800" height="308" alt="Image" 
src="https://github.com/user-attachments/assets/b1bdecd1-fe66-433c-a3bf-c6d39600817a";
 />
   
   **Possible Cause of the bug:**
   When triggering `callExtensionPoint` in 
`src/main/java/org/apache/hop/projects/xp/HopGuiDirectoryReplaceHomeVariable.java`,
 the 2 checks preventing `HopGuiFileReplaceHomeVariable` are bypassed:
   
   ```java
   String projectName = HopNamespace.getNamespace();
   if (StringUtil.isEmpty(projectName)) {
     return;
   }
   ProjectsConfig config = ProjectsConfigSingleton.getConfig();
   ProjectConfig projectConfig = config.findProjectConfig(projectName);
   if (projectConfig == null) {
     return;
   ```
   
   ### Issue Priority
   
   Priority: 3
   
   ### Issue Component
   
   Component: Hop Gui


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to