Suitcrm and mautic integration

Here is the relevant part from your link:

Forcibly restoring the Schema (as a last resort)

Keep in mind that except when DoctrineMigrationsBundle applies migrations, it actually has no idea what the database itself actually looks like. Thus, it is STRONGLY discouraged to manually alter stuff in the MySQL database on your own as you might end up in trouble down the road. As the Update Failed troubleshooting page describes, if your update ever fails and you are in trouble (and have taken a backup already) in descending order of importance you could try to:

  1. Try the update script again - and let Mautic handle everything
  2. Apply any outstanding migrations with doctrine:migrations:migrate
  3. Let the ORM update the Schema with doctrine:schema:update --force

Using the force has throw this error

I’m not that good with database, but can you point me to where I will access this See the database schema on Github for Mautic to make sure you are adding missing ones correctly. To start adding the missing columns. Thank you

Yeah your database is all messed up. It’s trying to drop indexes, that don’t exist. There are posts about this on the Mautic forum. Basically, a past update created an index, then a subsequent update removes the index. Since you seem to have missed the update that created the index, the subsequent one to remove the index will fail.

If I recall on the forum it suggests editing the doctrine update file and removing the directive to remove the index, which isn’t necessary, since you don’t have it anyway.

So basically as I see it you have two choices,

  1. hunt down all these issues to get your database back on track with the update process (probably a good idea).

  2. try and fix your immediate problem by making sure you at least have the correct columns in your DB to allow the sync to run. This would have to be done manually if you don’t do #1.

Ok, Let me see how to hunt the issues. Thank you.

But can you tell me why I have this issue

That’s a different issue. You haven’t applied the PR in my blog article to the detachEntities call. It’s broken, check my blog article posted above. It tells you which line to change to fix this issue.

I have gone through you blog post and the video I need not see the PR you are refereing to. I also, followed all comment on Github I did not see a direct solution. Can you point the solution session on the thread discussion? Thank you
See this
913 : $this->integrationEntityModel->getRepository()->detachEntities($integrationEntities);
And replacing it with the line from version 4: $this->em->clear(ā€˜Mautic\PluginBundle\Entity\IntegrationEntity’);

Another thing, can I dump the current database and create another one for mautic? will it work? Please help out

Yes replacing that line with the old line fixes this issue.

I wouldn’t recommend dumping/creating a new database. Do you currently have no contacts or other data in Mautic?

Basically what I did (I think I had this problem as well recently) was to grep the files to find the database docterine file that contained the uncessary transformations and just removed that line from the docterine file. It looks like you have a few of these from the error out put. Then I got the docterine:update to work properly and it gets you back on track.

No, I don’t have any data on the database. All data is on suitcrm. Mautic is just freshly installed.
I will get it replaced now and get back to you. Thank you very much for your help. I will be buying one of your course soon

It might be easier to just create an index with that name in the DB, do that the installer can then delete it

:point_up_2: or that too! As @pgr suggests you could create the index and then allow the update to delete it and complete successfully.

I don’t understand. Please can you be clearer?
Thank you

  • During the installation phase, you create the index in the database, typically as a temporary or placeholder index.

CREATE INDEX temp_index_name ON table_name (column_name);

  • With the index created, Mautic can proceed with the setup. If the installer is looking for specific indexes, this satisfies that requirement.
  • After the installation is done and Mautic is ready, you can delete this temporary index because it’s no longer necessary.

DROP INDEX temp_index_name;

Okay, thank you.
So, I should go ahead to drop this index

After replacing the line, this is the new error it throws out

I have cleared the cache too. So, I don’t this php level Thank you

Thats a new one for me. What version of PHP are you on both on SuiteCRM and Mautic?

Mautic is using php 8.1 and suitcrm is on 7.4

That should be fine. I really have never seen that error before. I don’t know what further guidance to give you.

That means I have hit rock

But, have you able to installed and configured Mautic with SuiteCRM successfully? :thinking: :melting_face:

You can search or ask on Mautic Forum: