Home Forums Development Changes to workspace not loading

Viewing 14 reply threads
  • Author
    Posts
    • #21693
      Max WidmaierMax Widmaier
      Participant

      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, 5 months ago by Max WidmaierMax Widmaier.
    • #21707
      Trevor BallTrevor Ball
      Participant

      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
    • #21722
      Max WidmaierMax Widmaier
      Participant

      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
    • #21730
      Trevor BallTrevor Ball
      Participant

      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
    • #21755
      Max WidmaierMax Widmaier
      Participant

      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
    • #21763
      Ed ShawEd Shaw
      Keymaster

      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
    • #21774
      Shahzad Qureshishahzad.qureshi
      Keymaster

      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
    • #21784
      Max WidmaierMax Widmaier
      Participant

      Thank you very much! I’ll keep that in mind for future use.

      0
    • #21797
      Max WidmaierMax Widmaier
      Participant

      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 of Persistent 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
    • #21805
      Trevor BallTrevor Ball
      Participant

      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
    • #21817
      Max WidmaierMax Widmaier
      Participant

      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
    • #21825
      Shahzad Qureshishahzad.qureshi
      Keymaster

      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
    • #21832
      Max WidmaierMax Widmaier
      Participant

      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.
      Image of Main.upgrade

      Image of model version

       

      Thank you everyone for all the assistance!

      0
      • This reply was modified 1 year, 5 months ago by Max WidmaierMax Widmaier.
    • #21841
      Trevor BallTrevor Ball
      Participant

      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
    • #21849
      Max WidmaierMax Widmaier
      Participant

      Great all issues resolved! Thank you everyone!

      0
Viewing 14 reply threads
  • You must be logged in to reply to this topic.