No announcement yet.

sync application in security module

  • Filter
  • Time
  • Show
Clear All
new posts

  • sync application in security module


    When I tried to sync application in the security module, I still sync those application that I have deleted from my project.

    ​Is this a bug?

  • #2
    If I understand right you talk about the sec_apps table. If you remove an app from your project the app is still in this table. You have to manually remove the app from the sec_apps table. Anyone correct me if I'm wrong.


    • #3
      I have removed that app from the sec_apps table but when I clicked sync app again, the app still will appear back into the sec_apps table.


      • #4
        I tried to search in my project folder for the app name, I could not find the app folder but I noticed there is a file "appname_ini.txt" in the project folder under _lib/friendly_url.

        ​Anyone can kindly advise on this?


        • #5
          Iím facing the same issue with one annoying app I created and deleted months ago.. everytime I sync apps it comes back again although I deleted it from the IDE and DB.. so annoying.


          • #6
            ​Thanks for the clarification.
            ​I have tried to remove all the "sec_" table and delete all the security module.
            ​After which, I redo the security module. Strangely I still will sync back those deleted applications.
            ​I think next time I will just create a test project to do any test application.


            • #7
              Since SCRIPTCASE v5 syncing Apps never worked for me. It only works when you create a new Security Module, then later it does all kind of garbage activity.
              I notices in the code there is reference to the /fiendly_url/ folder so perhaps this is messed up,... I going to take a closer look at it


              • #8
                When you compile an application it creates a folder for that application in the APPLICATION subdirectory of your project AND an INI file in the "Application\_Lib\friendly_url" directory. The sync apps utility reads the contents of these two directories and merges them .. then looks for the application in the sec_apps table and, if not found, adds the application to sec_apps and sec_groups_apps tables.

                The issue is - when you delete an application, it deletes the folder in the APPLICATION directory but not the INI file in the friendly url directory - so when you sync again, it puts back your deleted applications (although they have no folder).

                Version 9.x added the option to "Check if app is published" - if you set this to yes (default) it will ignore those orphaned INI files. If it is set to NO, they will be included.

                To cleanup and start fresh:
                Delete all folders EXCEPT _lib in the applications directory.
                In the _LIB directory, delete all of the INI files.
                Delete the contents of the sec_apps table (if you have a foreign key setup it will also delete contents of sec_groups_apps) - you must use delete NOT empty table
                If you don't have a foreign key on the sec_groups_apps table, you will also have to empty that table
                Recompile ALL of your applications (you can see it recreate the folders/ini files back if you watch)
                Run the SYNC APPS utility again


                • #9
                  In fact, when you synchronize then the database is filled with the file structure containing the applications. SC only appends / inserts, never deletes. It has been this way since I started SC. I created a small application for that to delete them from the security tables. Not a nice solution, but very effective ;-)
                  Albert Drent
                  aducom software netherlands
                  scriptcase partner, reseller, support and (turn-key) development