I am trying to adapt old (SuiteCRM 7.x) custom module to new (SuiteCRM 8.x) CRM. It seems all fine, but there is one thing that is making issue (doesnât load module legacy list view). I added module_routing.php file to ../../extensions/<module_name>/config/module_routing.php path to load module legacy listview and is working good, but if I enable PackageScanner or try to upload module to SuiteCRM Store itâs not allowed, because of ../../.
Why are you trying to use v8-style extensions if you just want a legacy thing? I donât know exactly what your needs are, or how all of this should be done, but I would try to start with something simpler.
If you just put your module in the usual place, under âpublic/legacyâ, what happens? Is this a purely custom module, or is it a customized core module?
I am trying to make custom module compatible with SuiteCRM 8.x and therefore it seems to be working, but only when enabling legacy list view in not allowed location. This means that there should be some way how to make legacy list view in compatible/safe way. Can you please help with that?
Thank you for your reply. I made simplified custom module which you can download and install (https://file.io/YnsUG2g7yDeH). There are no functionality, only possibility to show ./modules/CustomModule/views/view.list.tpl which should show text We want to show this view when using module list view from ./modules/CustomModule/templates/main.tpl.
Hope this will show up whatâs going on. Thank you!
Thank you for clarifying. The problem is that when I use only SuiteCRM v7 approach, then module list view is not displayed in SuiteCRM 8.x. I attached file (https://file.io/a3nZXFUTfwbc) where is no extensions directory with module_routing.php file. It doesnât work either. When accessing CustomModule from SuiteCRM 8.x top menu it shows native list view with error Error occured while retrieving records. While I need to display custom view. Is there any chance to get it working without mixing?
Also, I am new to this scenario - I donât really know the answers.
I would try creating a new custom module in v8, using Module builder. Do it under source control (git), then examine which files were created or changed. Then when you have that working, try putting your code inside that âskeletonâ.
What you offer is to use Module Builder from SuiteCRM Administraton section, but itâs creating âstandartisedâ module with default list view. I need to address SuiteCRM 8.x module menu entry to custom list view. Maybe there is some method how I can rewrite the module menu link to show up custom action (probably I could duplicate action_listview)?
This is almost correct, however as pgr says there is a difference between Symfony extensions and Legacy Modules, to do what you are asking you actually need your Legacy module installed in public/legacy/modules/ AND an extension in the top level extensions folder (just above public)
so:
extensions/MySymfonyExtension/config/module_routing.php
public/legacy/modules/NewLegacyModule
The you need to do a php bin/console cache:clear AND an R&R in the admin panel ensure your permissions are correct etc.
Please note that the name of the SymfonyExtension must follow PSR so no - etc in the name. Also the name of NewLegacyModule should match the name of your module exactly (case as well).
The word NewLegacyModule here should match (case etc) your Suite7 module placed in the legacy folder (I believe it should be the module name ie AOS_Quotes not necessairly the folder name -which is normally the same but can be different).
Your temporary download is gone so I cant check the actual files.
I can tell you the above works for me (we created a help module that uses the conditions from the workflow module that absolutely requires legacy mode to display them).
Thank you for reply. Actually this is question how to do it in right way. I attached temporary file to the current post: Filebin | hygxdtkdsr7x991a
If you have time, please, comment it - maybe it should be done in different way?
Looks mostly okay, as a project package however I think I saw an issue somewhere (that others mentioned) about the copy command not being able to copy outside of the legacy folder (ie the Symfony Extension), there is a post process command (see the docs.suitecrm.com) where you can add a php script to run after processing, I would suggest you try copying your Symfony module into place manually with a PHP script rather than the manifest.php installer.
I havent actually used the installer with Suite8 apps (we are developing here with git and applying the files directly).
The actual code looks okay though, have you tried putting them in place on a stock Suite8 install?
Regards
It seems that this solution works only first time, after some time SuiteCRM deletes the directory /public/extensions/CustomModule/ and itâs not workgin anymore. Maybe there is alternatives? Thank you!
If you peruse the docs there are two âextensionsâ folders. public/extensions/myextension is a Cache folder and is naturally cleared when you do a php bin/console cache:clear (or similar). When you do this it rebuilds that from the extensions/myextension/public folder (this extensions folder is the one at a level above public). So this is where you should be storing filesâŚ
structure overview:
bin
config
extensions â Store Suite8 Extension folders here
public
public/extensions â Cache folder dont put anything there yourself.
public/legacy â Legacy modules/folders etc
Within the Suite8 Extensions folder there is also some requirements:
extensions/myextension/ â Suite8 Extension Storage location as above
config â Config files and PHP file to enable the extension
app â can be renamed but âdefaultâ location to have your development angular files.
backend â standard place to store symfony/suite8 process files
public â Storage location for compiled angular files - important do not rename - must be here for cache rebuild to work
That initially worked, however when going back to the page 5 minutes later the error returned (âError occurred while retrieving recordsâ) and old view is displayed? Do you have any further ideas what could be causing this and how to properly manage custom list view?