SQL Server & SSDT : Error modeling database during Publish after adding CREATE AGGREGATE / EXTERNAL NAME

I am using SSDT to create a database containing CLR user defined aggregates.

The aggregates are intended to sit in different schema. That is not possible with CLR objects inside SSDT, without using a post-deployment script to move the objects after deployment.

What I am attempting to do is:

  • Create the CLR aggregates in a single schema (the “CLR” schema) using the “Default schema” option
  • Use a CREATE AGGREGATE wrapper in the desired schema to call the CLR aggregate

For example, I have a CLR aggregate like:

(Serializable)
(Microsoft.SqlServer.Server.SqlUserDefinedAggregate(Format.UserDefined, MaxByteSize = -1))
public struct StatsEntropy : IBinarySerialize
{
 ... etc
}

This get compiled and becomes CLR.StatsEntropy in the database. The database is called AnalysisFunctions, so it has an assembly also called AnalysisFunctions. This is no problem.

I then create a wrapper in the Stats schema like so:

CREATE AGGREGATE (Stats).(Entropy)
(
    @Values FLOAT
)
RETURNS FLOAT
EXTERNAL NAME AnalysisFunctions.StatsEntropy

This works without error when I build via debug. I have my debug connection set to a named instance of SQL Server. If I press F5, it compiles and deploys without any problem. The code is now usable on the server, including the wrapper.

But, if I attempt to publish to a server using Publish, it does not work. Instead it fails with:

Errors occurred while modeling the target database. Deployment cannot continue.

There are no further error messages either in the Data Tools Operations panel or error list. ssdttrace shows no useful information:

ssdttrace event log

This only happens when the database already exists on the server. If I drop the database, it can deploy successfully. I can deploy successfully via debug even if the database already exists, it is only via Publish that the problem occurs. I did not start getting this problem until I added the aggregate wrappers.

Previously I was also getting errors indicating that the assembly AnalysisFunctions had an unresolved reference due to the use of EXTERNAL NAME – again working via debug, not via publish. But now that error has mysteriously vanished.

I am using Visual Studio 2017 15.9.21 and SSDT 15.1.62002.01090, deploying to SQL Server 2019.

Does anyone have any idea what this error might be, or how I can debug it?

mysql – Adding a disabled foreign key to InnoDB table

The concrete problem is having a vast database which is lacking foreign keys, which makes it difficult for developers to work on.

The plan was to add disabled foreign keys to it initially, which would allow generating EER diagrams from the DB and would increase developer productivity, but from what I could find, it is not possible to have disabled foreign keys when using the InnoDB storage engine.

A solution to the DB understanding problem could be creating an EER diagram using MySQL Workbench and sharing it, but that would cause a lot of issues regarding synchronization, awareness of it, etc.

Long term plan would be to enable the FKs over time with all the necessary precautions.

Is there any way I can create disabled FKs when using InnoDB?

What other suggestion would you have for the concrete problem of generating DB diagrams with FKs connecting the tables?

javascript – 400 error when making POST request (adding item to SP list)

I have a form that contains check boxes and input fields, and hitting the Submit button should ideally add the content values to a SP list.

When I run the debugger I can see that each input (checked items, text inputs, etc) is getting passed into addItemToSPList, but when I open the Network tab I seeing the following error: “value: “A node of type ‘StartArray’ was read from the JSON reader when trying to read a value of a property; however, a ‘PrimitiveValue’ or ‘StartObject’ node was expected.”

I’m suspecting that something’s wrong within my ajax block (perhaps the url), but I’m not 100% sure.

Any thoughts on what’s going on?


JS code:

  handleClick() {
  // some code
    addItemToSPList(specialtiesArr, regionsArr, commentsArr, nameArr)
  }

} // export default class closing bracket

  function addItemToSPList(getSpecialties, getRegions, getComments, getSubmitterName) {
        let specialistRequestsColumns = {
            "__metadata":{"type": "SP.Data.Specialist_x0020_RequestsListItem"},
            "Title": "No Title", // marked it as "not required" in the SP list backend
            "Specialties": { '__metadata': { 'type' : 'Collection(Edm.String)'}, results: getSpecialties }, // multi-select
            "Regions": { '__metadata': { 'type' : 'Collection(Edm.String)'}, results: getRegions }, // multi-select
            "Comments": getComments, // text box
            "SubmitterName": getSubmitterName // input field
        }
    
        let listName = "Specialist%20Requests";
        $.ajax({
            url: `${_BaseHost}/redacted/_api/web/lists/getByTitle('${listName}')/items`, // ?$select=ListItemEntityTypeFullName
            method: "POST", // type
            async: false,
            contentType: "application/json;odata=verbose",
            data: JSON.stringify(specialistRequestsColumns),
            xhrFields: {
                withCredentials: true
            },
            headers: {
                "Accept": "application/json;odata=verbose",
                "content-type": "application/json;odata=verbose",
                "X-RequestDigest": $("#__REQUESTDIGEST").val()
            },
            success: data => {
                console.log("upload successful")
                // console.log(data)
            },error: (err) => {
                console.log("Error: " + err);
            }
        })
    }

magento2 – Adding htmlContent to a listing UiComponent

If I insert a block into a <form> component using an XML snippet like this:

<htmlContent name="my.block.html">
  <block class="VendorModuleBlockMyBlock" name="my.block.block" />
</htmlContent>

It works as expected. However, exactly the same code in a <listing> UiComponent renders the block, but also generates this error:

Type Error occurred when creating object: MagentoUiComponentHtmlContent, Argument 2 passed to MagentoUiComponentHtmlContent::__construct() must implement interface MagentoFrameworkViewElementBlockInterface, array given

Can htmlComponents not be used in listings, or are there extra steps I need to take?

sharepoint enterprise – Adding a new server to the farm

I am currently trying to add a new web front end server to my SharePoint Farm. However I am faced with an issue, the update ‘SharePoint Server 2013 (KB2899494)’ is present in my farm, so in order to join a server to the farm i need to install this same update in my new server, but the update is no longer available from Microsoft.
What can I do to get this update?

windows – Adding a Word to New Custom Dictionary Spell Check Still Fails

I have added a custom dictionary and added the Word “dialing” to it. Please see the screen shot below where this shows:

dictionary list

word added to dictionary

The spelling still doesn’t get picked up when I open the a new appointment and set up a Teams Meeting.

enter image description here

Ultimately what I am trying to achieve is to get this to work in my Outlook and then I need to find a way to deploy this to all the staff as they all require this spelling to not be marked as incorrect.

Can anyone help?

usability – How to show “variants” of a product when adding to cart?

I have a list of products that the user is able to add to cart fastly so from main page the user could click just add to cart button on each product and the product will be added to the cart.

BUT each product could have some variants with which it can be added to the cart. Till now i’ve added the variants inside the modal with the product info which is opened when the user press on the product from the list, then at the bottom there is the list of variants which the user can select and then from that page add it to the cart.

So i thought to show the variants each time the user press the fast “Add to cart” button and remove the “Add to cart” and variants from the “info” modal but at this point that “Add to cart” will not be fast and as the most of the users will just not care about the variants it will affect their experience.

In the following gif you could see the main page with the list (and the blue button that is the fast “Add to Cart”) and when the product is pressed and it’s modal info is toggled with the variants and another “Add to cart” button.

enter image description here

And as you can see it’s not intuitive that the user can press each product and under all info there will be the variants…

So which would be the best way to give the user choice of adding or not the variants?

images – Adding Post Thumbnail to Metro Pro Theme

I am trying to add a post thumbnail so that when users land on my homepage queenmypawn.com, they see an image to the right of the text, like in the website https://totalreporter.com/.

Currently my website doesn’t do this. I tried using this guide: https://www.wpbeginner.com/beginners-guide/how-to-add-featured-image-or-post-thumbnails-in-wordpress/. I added a featured image and the php code, but I am confused at this very stage:

To display featured images in your theme, you need to edit your templates and add this line of code where you want to display the featured image:

<?php the_post_thumbnail(); ?>

The files you add the above code in will vary based on your theme. You will want to add the code inside your post loop.

Which types of files are those?