Post-Migration: 1 custom Entity relationship Link not working / but all others OK

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • elrako
    Junior Member
    • Jul 2023
    • 1

    Post-Migration: 1 custom Entity relationship Link not working / but all others OK

    Hi All,

    I successfully set up EspoCRM and have also successfully moved it to another server, as well as also used Python w/ SQLAlchemy and Pandas to migrate data from our old SugarCRM CE which we used since 2009, over to a dev copy of our EspoCRM build.

    The python script moved 7,190 records, each of which had 130 columns. So a it did take some effort but has worked fine.

    Except for one entity, let's call it Recruitment, not linking to related data (I think in Espo it's called a foreign entity?).

    Here are the custom Entities

    "Recruitments"

    which related to other entities like:

    "Major Newspapers"
    "Local Newspapers"
    "Radio Stations"
    "Online Ads"

    So a single "Recruitment" record for "ABC Corp" might include a job advertisement in one or more of the:

    "Major Newspapers"
    "Local Newspapers"
    "Radio Stations"
    "Online Ads"​

    So ABC Corp might run a job ad for "Electron Splicing Engineer" in

    "Major Newspapers" = "Los Angeles Post"
    "Local Newspapers" = "Venice Beach Beacon"
    "Radio Stations" = "Linux FM"
    "Online Ads"​ = "Glendale Microsoft Bug Guild"

    So my list screen in EspoCRM for "Recruitments" would show a recruitment like:

    Electron Splicing Engineer | Los Angeles | CA | Los Angeles Post | Venice Beach Beacon | Linux FM | Glendale Microsoft Bug Guild

    Or at least it did before I did the data migration with the above referenced Python script.

    What I mean is, the data for the related records is there, e.g. the 17 character ID field for "Major Newspapers" is present in the DB. As are the other ID's of the other media outlets.

    Some are working fine, like "Local Newspapers", "Radio Stations", and "Online Ads", but "Newspapers" isn't actually displaying in the List screen.

    And, even more importantly, not displaying in custom PHP / MySQL Reports that display a wider range of the overall data.

    When I open a record in EspoCRM, that has the news ID [field name news1_id in the recruitment entity table] in the database, it's not actually showing in the Espo record.

    It only happens during the data migration but the data migration is inserting exactly the correct ID.​

    Yet doesn't display in EspoCRM at the Record or List level. Just the DB level.

    The only thing I can think of was that I possibly created a bug or anomaly when I previously

    DELETED the Relationship

    of "Major Newspaper" from the "Recruitment" entity, due to having set the Link Type wrong as "One-To-One", and created it anew with the proper Link Type (Many-To-One), I possibly created an anomaly, bug, or condition that caused the record imports to work at DB level but not Link in the web app level.

    The reason I think this, is that "Local", "Radio" and all others work fine. The data comes across and all of the related links appear fine.

    It's just this one entity "Major Newspapers" that got it's RELATIONSHIP deleted and recreated, that's not displaying the Link.

    All others are working perfectly upon data migration. And they never had their relationship altered from what I can remember.

    Understandably, migrating 7,190 records x 130 columns wasn't going to be a cake walk, but as that side has all been solved, it's just this one condition that I'm observing that needs to be resolved.

    I've been working with Open Source since the earliest of times. And my explanation above could definitely use some improvement, either as a Loom video or a set of screenshots. Which I can definitely provide if needed. Like a screenshot of the DB showing the ID field present in the DB in the proper field, and another pic showing it not displaying in the Record or List.

    My question is, could there be some meta data that I need to sync up? Or some files I need to update?

    I've cleared cache and done rebuild and am on the most recent version.

    And, importantly, -I have ruled out the migration script with two separate Python experts.

    I'm wondering how I can get the "Major Newspaper" relational record Link working again for the "Recruitments" custom entity, or if I should instead delete the buggy entity entirely, recreate is, possibly even with a new name, and re-do my import? That seems a bit brute force.

    EspoCRM is too elegant well made to do that to, without first inquiring from the folks here in this forum, who might have some wisdom either now, or after I provide a bit more of the required information to help lead to solving this for myself, and others in what I hope will be a really great future for the tool.

    If needed I can provide screenshots and a Loom video, and thanks in advance for any guidance or info.

    It's even worth posting as a job for any experts in here who have experience in debugging, fixing, preventing occasional entity link linissues.

    Kind regards,

    Elrako
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1602

    #2
    It is always difficult to judge, where the error may come from, although you described in detail.

    What you could do:

    1. Look into the espoCRM log file (data -> logs, the most recent date). Very often there might be a hint to the problem.
    2. Look into the database. You write, that you deleted and recreated that entity, from 1:1 to another relationship. If you deleted the old relationship via adminGUI, maybe there are any tables of the old relationship still in the database.
    3. Look in the metadata of that entity, if something from the old relationship had been kept there.
    4. If nothing of the before helped, look into the server log files
    5. In an open browser window with that entity, press F12 to open the browser tools -> console to see if there is any javascript conflict.

    I guess, you will find anything in one of these options. If necessary, post anything here.

    Comment

    Working...