After migrating from 7.12.1 to 8.2.2, everything breaks. CSS and JS are not working

I migrated SuiteCRM instance from 7.12.1 to 8.2.2. In the terminal it wet well. But I tried to access it from the browser everything breaks.

  • No styles,
  • Uncaught ReferenceError: $ is not defined
  • Uncaught ReferenceError: YAHOO is not defined
  • Uncaught ReferenceError: SUGAR is not defined

Please check the screenshots attached. And When I click any link it shows “Unexpected error when calling action”

I have set permission as per the documents.

find . -type d -not -perm 2775 -exec chmod 2775 {} ;

find . -type f -not -perm 0644 -exec chmod 0644 {} ;

find . ! -user www-data -exec chown www-data:www-data {} ;

chmod +x bin/console

==
.htaccess looks like this
RewriteBase /SuiteCRM-8.2.2/public/legacy

I am stuck here. Can some one help me out please?

1 Like

Another screenshot

Is your web server really running as www-data:www-data? You’re not supposed to use those names directly from the documentation, you’re supposed to use the ones that actually apply to your system.

Otherwise, you’re really removing access when you mean to give access.

Thank you for your reply.
I am on Ubuntu 22.04. Here are some screenshots to support www-data runs Apache. Even I tired with the root user with 777 access.

Ok.

And did you run a Quick Repair and Rebuild after re-setting the ownerships and permissions?

May I know what I am supposed to do Repair and Rebuild? Because I am unable to redirect the admin page. When I click the admin link, it shows “Unexpected error when calling action”

What is your PHP version?

Do you see any FATAL errors in your logs? Check both suitecrm.log and php_errors.log, please

No Fatal errors. Suitecrm.log has no recent logs.
PHP 7.4

I’m running out of ideas :slight_smile:

Maybe try a QR&R from the command-line (robo), look it up.

You mean I need to run these commands.

  1. Run yarn run build:common
  2. Run yarn run build:core
  3. Run yarn run build:shell
  4. Run composer dumpautoload

If yes, I tried with sudo as well. I did not find any solution, then I posted here

No, I was thinking of things like

./vendor/bin/robo cache:clean
./vendor/bin/robo repair:database
./vendor/bin/robo repair:rebuild-relationships
./vendor/bin/robo repair:rebuild-extensions

you can get a full list with

./vendor/bin/robo list

1 Like

I do not see robo inside vendor/bin
In fact, I see very less files there. Please check the screenshot. Did I miss anything?

I am not sure how this works in SuiteCRM 8, is there something under public/legacy/vendor?

I know there are also Symfony console commands in v8, from the top leve, something like

./bin/console suitecrm:repair
or
./bin/console suitecrm:app:repair

but I can’t try it right now. Try to find your way around that console, there’s probably a way to list all available commands.

Unrelated: did you do all the mod_rewrite configurations and web root, correctly? I don’t like the look of your URLs in the screenshots above, that “public” shouldn’t be there.

Ok. I will update my vhost and document root up to public and check. I will let you know.
Thank you

1 Like

I updated vhost and document root. Still I am getting the issues.
I tried to migrate from the beginning with php 8.0. I am getting the issues. Please check the screenshot.

You’re not showing the URL, which is what matters now.

You should type
www.mysite.com
into the browser, and it would change to
www.mysite.com/#/Login

You should never see “public” in the URL.

Attaching a screenshot

Dear @pgr,
I think it is the theme that creates the issue. I switched to the Suit 8 theme, pages are loading. But for Suit P theme, everything breaks.
Can you please tell me why this is happening? Or I need to start a new topic?

How/where did you charge the theme?