Home › Forums › Development › Changes to workspace not loading
Tagged: UI Developement, Upgrades, Workspaces
- This topic has 14 replies, 4 voices, and was last updated 1 year, 10 months ago by Max Widmaier.
-
AuthorPosts
-
-
February 4, 2023 at 7:46 pm #21693Max WidmaierParticipant
Hello everyone,
I’ve started to do some modifications to our UI, specifically working on the Contacts workspace. I’ve encountered an odd issue where the changes to the workspace just do not save. I’ve also tried modifying the portal and referencing a different workspace but that also doesn’t work. Is there some special procedure that you need in order to modify the UI? I haven’t had any troubles modifying anything else until now. I haven’t had any trouble modifying portlets, just workspaces and portals.
Thank you for your assistance.0- This topic was modified 1 year, 10 months ago by Max Widmaier.
-
February 5, 2023 at 2:38 am #21707Trevor BallParticipant
Hi Max,
Without knowing specifics, it’s difficult to know what your issue could be, but the first thing that comes to mind is that workspace changes require a SysUpgrade, so if you haven’t added a Load upgrade step to Main.upgrade, I recommend that you try that. Good luck!
0 -
February 5, 2023 at 1:21 pm #21722Max WidmaierParticipant
Ok, I can give specifics. A while back, our CRM had the business processes tab removed from contacts. I am trying to re-enable that by it visible again. I run the scheme console and the tab won’t appear. I tried changing the names of tabs just to check, and that also didn’t work. I am specifically modifying the
Contacts
workspace. I am unfamiliar with upgrades, I found Main.upgrade in the persistence/upgrades category. Is there some sort of documentation on it that I could read? I know for sure that I didn’t add a load upgrade step to Main.upgrade because I haven’t heard of that until now.0 -
February 5, 2023 at 2:06 pm #21730Trevor BallParticipant
I couldn’t quickly find a reference to it in the documentation, so I’ll defer to the Documentation team to comment on that, but if you didn’t add a Load upgrade step, I think that’s likely the explanation. A quick way to verify (and a development shortcut I often use) is to execute the SQL “Update NJVersion set loaded = 0” against the DefaultRelationalDatabase, and start/restart the server (scheme console). This will trigger a SysUpgrade, and I’m hoping it will give you the UI refresh you’re looking for, in your local environment. To actually deploy that change, you’d want a Load upgrade step, but you can figure that out afterward (not that it’s complicated: just add a Load step to Main.upgrade and increment the metadata version). If that doesn’t resolve your issue, please let us know, and maybe somebody else will have another suggestion.
0 -
February 6, 2023 at 11:00 pm #21755Max WidmaierParticipant
Thank you, that forced SysUpgrade seems to have done the trick. Is there any work around for reloading everything, or will I just have to go through that each time? It doesn’t take all too much time but it’s a little annoying. I understand that the load step is for when you export/publish your model. Is that correct?
0 -
February 6, 2023 at 11:10 pm #21763Ed ShawKeymaster
If you have a console running against the model in which you’ve made UI changes, you can run the following script to see your changes immediately.
(portal:Portal’initializePersistence)
(commit)What this does is commits your metadata changes to layout, workspaces, portals, dialogs, … to the database. This is required to see your changes, but doesn’t take very long.
Cheers,
Ed
0 -
February 7, 2023 at 12:22 pm #21774shahzad.qureshiKeymaster
You can also use
(begin-privileged (SysUpgrade’seed)(commit))
in your running server console to simulate the load step in Main.upgrade but please keep in mind you must add a load step if needed before pushing your code to code repo as the above code does not replace the need for main.upgrade’s load step for a deployed environment.
0 -
February 7, 2023 at 10:13 pm #21784Max WidmaierParticipant
Thank you very much! I’ll keep that in mind for future use.
0 -
February 9, 2023 at 12:13 am #21797Max WidmaierParticipant
I’m getting an odd error. I added a load step to Main.upgrade and incremented the model version (in the manage models tab in NexJ Studio). When I try to deploy (within NexJ Studio) I get a
nexj.core.persistence.PersistenceException
with the additional information ofPersistent storage version "85.1231.1307.175.53" of data source "DefaultRelationalDatabase" (fragment "") does not match the repository version "86.1231.1307.175.53" (namespace "njwc").
I am a little confused as to what’s happening. Do I also need to add a RelationalDatabaseUpgrade. Is there an actual method to increment the model’s metadata version other than in the manage models tab? I must be doing something wrong, but I’m not very familiar with this since I’ve only just started developing.0 -
February 9, 2023 at 1:00 am #21805Trevor BallParticipant
From the look of this error message, it appears that you have made the right changes, but this indicates that you need to upgrade your database. Please refer to the upgrade documentation for this.
If you’re just trying to do this for your local development environment, you could refer to the Data Load Tool documentation (specifically the section on Upgrading Databases) for a simpler method. Furthermore, if you don’t care about your existing data, you could just recreate your database (also using the Data Load Tool) which is even simpler, and which you would’ve already done previously.
0 -
February 9, 2023 at 1:04 pm #21817Max WidmaierParticipant
Thank you very much Trevor, that is exactly what I was looking for! Ya, I would rather not delete the database, but that did cross my mind.
0 -
February 9, 2023 at 1:09 pm #21825shahzad.qureshiKeymaster
As a general rule, you should never have to recreate (drop and create) your database once the solution is in a production or even a pre-production environment. If you change requires a recreate, there is a problem with that change and needs to be reworked.
0 -
February 9, 2023 at 2:35 pm #21832Max WidmaierParticipant
That makes sense. I added some upgrade steps for the relational database and incremented the model version. I get the same error as before except that upgrade step was added. I tried running the data load tool and running an upgrade. However, I get an error that DefaultRelationalDatabase is not upgradable.
java.lang.IllegalStateException: Data source "DefaultRelationalDatabase" is not upgradable.
Is there something special about DefaultRelationalDatabase that specifies it cannot be upgraded?I think these may possibly be two separate errors since it seems that NexJ studios isn’t recognizes the changes to Main.upgrade. The reason I think this is that the database upgrade step has the same version as the model but that step doesn’t seem to have been detected. Rather it defaults to the last RelationalDatabaseUpgrade step.
Just for reference, here are some screenshots. If there seems to be anything amiss, please let me know.
Thank you everyone for all the assistance!
0- This reply was modified 1 year, 10 months ago by Max Widmaier.
-
February 9, 2023 at 2:55 pm #21841Trevor BallParticipant
When you use the Data Load Tool to upgrade your database, there’s an “Ignore Upgradable Flag” checkbox, which you’d want to check in your case. (In theory, you should set the upgradable flag of your data source to make it upgradable, but in practice that’s rarely done, especially in development environments, so that’s why that checkbox is there.)
0 -
February 9, 2023 at 8:49 pm #21849Max WidmaierParticipant
Great all issues resolved! Thank you everyone!
0
-
-
AuthorPosts
- You must be logged in to reply to this topic.