SuiteCRM 8 custom module not reflecting

I installed a new SuiteCRM 8.0 on Ubuntu 20.04, apache2, PHP7.4. MariaDB.

I created a custom module, Edit view layout and detail view layout are not reflecting as arranged.

Suitecrm log shows this:

Error: File [modules/SavedSearch/metadata/editviewdefs.php] is missing. Unable to create because no corresponding HTML file was found.

Why hello @jibe9191 Welcome to the community! :wave:
Usually that happens if the files doesn’t have the correct permissions. If what is happen is that you have a custom module, you save & deploy changes made to the edit/detail view that usually is because the system can’t update the files to accurately reflect your changes and thus shows what was there previously.

Ensure your files permissions and ownership of those files are correct first of all.

  sudo chown -R www-data:www-data
  sudo chmod -R 755
  sudo chmod -R 775 cache custom data modules themes upload
  sudo chmod 775 config_override.php

Make sure that www-data is your server’s user, you can quickly check by viewing the Scheduler’s admin page and that’ll show you the correct user to use.

1 Like

Am running SuiteCRM 8.0 and I set the required permissions based on:

find . -type d -not -perm 2755 -exec chmod 2755 {} ;
find . -type f -not -perm 0644 -exec chmod 0644 {} ;
find . ! -user www-data -exec chown www-data:www-data {} ;
chmod +x bin/console

Am a bit confused here please clarify

Is SavedSearch your custom module name? Well, first off that doesn’t exist. Did you deployed your custom module via module builder? After which do a repair & rebuild (ensure the permissions are correct).

SavedSearch is not the name of my custom module. The name is Swap.

I initial created the module via the Module Builder and it was the same issue I then reinstalled a fresh SuitCRM 8 and deployed via the module loader from both export and publish package from a working SuitCRM Version 8.0.0-beta.3 and Version 7.12 did the repair & rebuild yet the same error.

My permission was based on the guideline in:

If i could followed similar guideline to get SuitCRM Version 8.0.0-beta.3 to work then what could be wrong?

Any assistance with this issue?

Hi @jibe9191 ,

Sorry for the delay in replying.

Just a heads up, we are in a holiday season so I may take a bit to reply back.

I’ll need a bit more info in order to understand the problem. Could you try the following please?

  • On the file .env change the APP_ENV=prod to APP_ENV=qa
  • open the browser devtools
  • try again
  • Check the network tab for a graphql with an error entry on the response
  • This error should have a stack trace.

Could you send this please?

Thank you

Hi,

Thanks @clemente.raposo . We had a similar problem and this helped us to debug de code.

What we got:

  • We tried bringing a SuiteCRM7 own-build module into SuiteCRM8 and same error appeared.
"debugMessage": "Notice: Undefined variable: mod_strings",
"message": "Internal server error",
 "extensions": { "category": "internal" },
"locations": [{ "line": 2, "column": 3 }],
"path": ["createProcess"],
"trace": [
 "debugMessage": "Call to undefined method ViewDetail::ViewDetail()",
 "message": "Internal server error",
 "extensions": { "category": "internal" },
"locations": [{ "line": 2, "column": 3 }],
 "path": ["viewDefinition"],
"trace": [
  • Debugged graphql from netwoork tool and found some errors:
    1- We were wrong using variable $mod_strings in vardefs.php of a module
    2- We were using in view.detail.php of the module the deprectated constructor call parent:ViewDetail() and SuiteCRM8 didnt like that. We replaced it for parent::__constructor() and it worked fine

By the way, we found 2 compatibility issues with our SuiteCRM7 module within the vardef definition

  • We were using the property “popupHelp” in some fields to display a help tooltip in each field. In SuiteCRM 8 this tooltip doesn’t appear anymore.
  • We were difining this property to some of the fields:
'studio' => array(
                'quickcreate' => false,
                'editview' => false),

This will prevent the field from appering in any EditView. This doesn’t work in SuiteCRM8. I guess because the UI changed.

Hi @sinergiacrm,

Glad you were able to figure it out.

Regarding those 2 compatibility issues, could you create an issue on the SuiteCRM-Core project in github please? Thank would help us prioritize.

Hi @sinergiacrm .

I tried again to revisit SuiteCrm by install 8.0.3 and am still experiencing the same issue can you explain further how you resolved yours.

We are looking at migrating from our current CRM and if I cannot create custom modules it becomes difficult to test the software

Hi @jibe9191,

We found in our side there is a code that isn’t compatible with SuiteCRM 8. You can find the code in any of the view.xxxx.php files inside the views folder of the module. For example, if your module is Swap, the folder would be: /modules/Swap/views/view.xxxx.php

Check for any code that look like parent:ViewDetail() and replace it by __constructor() . It could be ViewDetail() or ViewEdit() or ViewList().

Let us know if it works.

Hi @jibe9191,

I know it was mentioned before however, I’d like to confirm you ran a “Quick Repair and Rebuild” from the Repair Menu in Admin Panel after you made the changes?

When you run this command do you get any chances displayed in the blue section at the bottom?
When looking at the database via an application like PHPMyAdmin are you able to see the new field added to those records in the correct table?

Thanks!

Hi,

Thank you for the feedback.
I followed your directions these are my observations:

  1. The custom module “Swap” does not have a views folder as can be seen on the image below:

The edit view only shows the layout for detail:

I did a Quick Repair and Rebuild and the database has the new field created:

I also edited the Contact edit view layout in Studio to see if the changes will reflect and there was no change in the layout.

Hi @jibe9191,

Thanks for the feedback.

Could you check the following files and add their contents here please?

  • modules/OAS_Swap/metadata/editviewdefs.php
  • modules/OAS_Swap/metadata/detailviewdefs.php
  • custom/modules/OAS_Swap/metadata/editviewdefs.php
  • custom/modules/OAS_Swap/metadata/detailviewdefs.php
1 Like

Hi,

These are the file content:

custom.zip (2.8 KB)
module.zip (2.8 KB)

Thank you.

Hi,

Kindly disregard the early custom zip file I sent that was from the cache folder. This is the correct files.
custom.zip (1.1 KB)

1 Like

Hi @clemente.raposo ,

Did you find anything from the files i sent?

Thank you

in suitecrm 8.0 onwords in custom modules and and some built in modules also image field is showing as text fields.

Hi @clemente.raposo,

I have the same problem with 8.1.2.
Today I updated to 8.1.3, but the problem continues.

I checked the files in the “custom” folder and the changes I made in EditView (in Studio) are in “editviewdefs.php”. When I edit the form the fields are the DetailView and not the EditView. The same with the creation form, the fields are the same as the DetailView.

Any idea what the problem is?

Thanks

Hi @dcrp.orc @jibe9191
I using Ubuntu 22.04, Suitecrm8.1.3, Apache2,mariadb10.6

same your issue please check this link it solves my problem
sudo chmod -R 775 cache custom data modules themes upload

after changing permission go to Module builder => deploy your project =>admin => repiar

ssh:
systemctl restart apache2 mariadb php7.4-fpm.service

All fields will appear in your module

please let me know
if it can help