Domain Mapping Error log

Error logs are getting created related to Domain Mapping in website. For example the logs are like:

[30-May-2018 05:45:45 UTC] WordPress database error Unknown column 'is_primary' in 'field list' for query SELECT blog_id`

Please check the chat logs for more info about the error. Please advise what should be done to correct this.

  • Adam Czajczyk

    Hello HMM | KUNDEWEB

    I hope you're well today and thank you for you question!

    The error seems to be triggered as a consequence of actions performed by various different plugins and is related to the "primary domain" settings.

    The most recent Domain Mapping release includes a fix for other issue related to mapping setting but that looks like it might be related so could you please update the plugin? I noticed that you're using 4.4.3 version and aforementioned fix is in lates 4.4.3.1.

    Once you update it, make sure that all the caches on server (if there are any) are cleared and see if the issue still occurs. If yes, let me know please and we'll investigate it further.

    Kind regards,
    Adam

  • Adam Czajczyk

    Hello HMM | KUNDEWEB

    Thank you for your response and explanation.

    I see that you're using Divi on the main site so yes, you're right, the most recent release might indeed be breaking that. There's already a "release-candidate" beta version ready that should be released really soon that seems to solve that. In case you wanted to give it a try, I have attached it to this post.

    However, since I wasn't aware that with the same version of the Domain Mapping that happens on only one of your Multisite, that changes things a bit. In that case, could we please start with the most basic check first? The error says that the column is missing so could you please:

    - access your site's database via phpMyAdmin (or similar tool),
    - find the "prefix_domain_mapping table" (replace "prefix_" with the db prefix used on your site)
    - look at "structure" and see if the "is_primary" column is indeed missing?

    The table should consist of these 6 columns:

    id
    blog_id
    is_primary
    domain
    active
    scheme

    If the column is indeed missing then it would suffice to add it, which can be done via phpMyAdmin as well. You would need to create it as "varchar(191)" with no default value and no auto-increment. In case you'd need help with this I can provide you with an SQL command for that too (though in phpMyAdmin it can be done via UI easily).

    If the column is not missing or you added it and the issue is still happening, let me know and I'll include our developers in the case.

    Kind regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.