Unsafe attempt to load URL from frame with URL. Domains, protocols and ports must match

I am having issue in sitemap.xml. My sitemap.xml (https://www.***.com/sitemap.xml) not working in chrome browser throwing the following console error and screen was blank. But the same is working in Mozilla. Kindly help me to solve this problem.

error:

Unsafe attempt to load URL https://***********.cloudfront.net/wp-content/plugins/google-sitemap-generator/sitemap.xsl from frame with URL https://www.***.com/sitemap.xml. Domains, protocols and ports must match.

Match tag names with form titles

I am trying to match tag names with form titles to fetch the correct form into the current post, to subscribe to new posts tagged with the current posts tag. I only have 1 tag assigned per post.

The code for categories works well, and I tried to transcribe it for tags, but I am afraid there are syntax errors in the code, because it does not work.

How do I write the correct code?

add_shortcode( 'subscribe-to-tag', function() {    global $  wpdb, $  post;   $  the_tag = get_the_tags( $  post->ID ); $  tag_name = $  the_tag[0]->tag_name;    $  id = $  wpdb->get_var($  wpdb->prepare("SELECT ID FROM wptq_forms WHERE name = '{$  tag_name}';"));    if (is_null($  id)) { return ''; }    return do_shortcode( '[newsletter_form id="' . intval( $  id ) . '"]' ); } );  

Google Analytics – Match URLs on Unique Number in Content Drilldown Using RegEx?

I am trying to track pageviews on Google Analytics for knowledge base articles (on Zendesk). Each article has a unique number. However, the title of the page is sometimes appended to the URL, and GA tracks this as a separate page. If the title of the article changes, it generates a new URL.

For example, these would all be the same article, so I want to see a single pageviews count, but GA would show as 3 separate stats

/hc/en-us/articles/360039413394 /hc/en-us/articles/360039413394-How-To-Make-A-Sandwich /hc/en-us/articles/360039413394-How-To-Make-A-Turkey-Sandwich 

I want GA to roll up the articles matching on the unique number, and ignoring everything after that. Is there a built-in way to do this? Is there a way to do this with Regex? Where would I add the Regex for the Content Drilldown page? Help!

Thank you.

Postgres: Efficient schema for querying with one exact string match and two range matches

The table I need to query:

CREATE TABLE regions (     state text NOT NULL,     zip_begin text NOT NULL,  -- 9-digit zip code     zip_end text NOT NULL,     date_begin date NOT NULL,     date_end date,      data ..., ) 

There are ~50 states and between 0-5M rows per state. The zip and date ranges might overlap.

The following will be one of the most common queries in my OLTP application:

SELECT data FROM regions WHERE state = {state}   AND {date} BETWEEN date_begin AND date_end   AND {zip} BETWEEN zip_begin AND zip_end 

This query usually yields one row, but may sometimes yield more.

From the Postgres docs, it sounds like a GiST index might do what I need, but I don’t really understand how those work.

CHECK Constraint to enforce upper case letter and pattern match

For one of my columns I am trying to enforce a pattern. The first letter should be D upper case, and the remaining 3 characters should be digits. For example:

D678, D890, D000

I’m quite new with CHECK constraints and things like regular expressions.

Below is what I’ve done so far, which (I think) enforces the general pattern. However when I try adding something like d900 it works, even though it’s a lower case d. I expected this to fail.

Can someone please assist:

CREATE TABLE Systems( SystemsID NVARCHAR(4), Title NVARCHAR(30), CONSTRAINT chk_SystemsID CHECK (SystemsID LIKE '[D][0-9][0-9][0-9]')); 

NOT EXISTS with two subquery fields that match 2 fields in main query

Background: Two different document types in a document management system. Both Doc Type A and Doc Type B have a Ticket #, and a Ticket Date. What we’re looking for: Doc Type A docs that don’t have a matching Doc Type B doc (NOT EXISTS) with the same Ticket # and Ticket Date. There like are Doc Type B docs that have the same Ticket # but NOT the same Ticket Date. We want to ignore those. Seems simple…. but I am stuck. So far what I have is something like this:

SELECT distinct ki110.keyvaluechar AS "Ticket #", ki101.keyvaluedate AS "Ticket Date"  FROM itemdata  left outer join hsi.keyitem110 ki110 on ( itemdata.itemnum = ki110.itemnum ) left outer join hsi.keyitem101 ki101 on ( itemdata.itemnum = ki101.itemnum ) WHERE   ki101.keyvaluedate BETWEEN '01-01-2021' AND '01-31-2021' AND ( itemdata.itemtypenum  = 178  ) -- this is Doc Type A  AND NOT EXISTS (select ki110.keyvaluechar, ki101.keyvaluedate from itemdata, keyitem110 ki110 , keyitem101 ki101 where --(itemdata.itemnum = ki110.itemnum) --Ticket # 

— ** the problem is here for Date: I need to say Date in Doc Type B doc is not the same as Date in Doc Type A doc using ki101.keyvaluedate)

AND itemdata.itemtypenum = 183) -- this  is DOC Type B 

WordPress, fetching users with an exact match in a string of comma separated values in user_meta

I have data saved in user_meta -> areapref field. It is basically a string of comma delimited post IDs (e.g. 2, 37, 200, 300 etc.)

I need to check if the user has a particular ID in this field. If so… do stuff.

I can check if an ID is in areapref using LIKE. But I believe this has an issue. If one location is ID=10, and another is ID=100 – both will match with 1, or 10? Or am I misunderstanding LIKE. I fear CONTAIN would have the same issue.

I need to know how to get a list of users who have an ‘exact match’ within the areapref string? So search for ID 2, will return only 2, NOT 22, or 20, 200 etc. I’ve spent hours going through stackexchange/overflow/wp codex and cannot find an answer… though I am dense!

Here’s enough code I hope to show what I’m currently doing… any ideas greatly appreciated.

function ds_notify_new_event( $  post_ID ){ $  url = get_permalink( $  post_ID ); $  event = get_the_title( $  post_ID ); $  localeID = get_post_field( 'location_id', $  post_ID); global $  wpdb; $  locale = $  wpdb->get_var( $  wpdb->prepare( " SELECT post_id FROM {$  wpdb->prefix}em_locations WHERE ID = %d ", $  localeID ) );  $  args = array(         'role'    => 'subscriber',         'meta_query' => array(                 array( 'key' => 'areapref', 'value' => $  locale, 'compare' => 'LIKE' ),                 // just checks usr is ok with email                 array( 'key' => 'notify', 'value' => 'yes', 'compare' => '=' )              ),         'fields' => array( 'display_name', 'user_email' )     ); // retrieve users to notify about the new post $  users = get_users( $  args ); 

// do stuff with users

SQL 2012 patching failure – The language of SQL Server instance MSSQLSERVER does not match the language expected by the SQL Server update

I’ve picked up the support for a SQL 2012 instance on a server at our German site and need to apply SQLServer2012SP4-KB4018073-x64-ENU.

The patching is failing with the installer showing error "The language of SQL Server instance MSSQLSERVER does not match the language expected by the SQL Server update. The installed SQL Server product language is German (Germany) and the expected SQL Server language is English (United States)."

The server properties general tab (in SSMS) shows Language German (Germany), but the SERVERPOPERTY(‘LCID’) shows 1033 (US_English). The registry entry shows 1031 (German) as the install language (https://www.sqlserverscience.com/basics/localization/language-used-sql-server-binaries/#comment-191) enter image description here

Trying to use the German patch file SQLServer2012SP4-KB4018073-x64-DEU results in “This SQL Server setup media does not support the language of the OS, or does not have the SQL Server English-language version installation files. Use the matching language-specific SQL Server media; or install both the language specific MUI and change the format and system locales through the regional settings in the control panel”.

Any pointers as to a way forward so I can apply the patch?