Can’t set Post ID properly

I’m trying to generate posts based on a JSON document. I’m stuck at the trying to assign the ID from the json document to the post’s wordpress ID. I read on here that the way of going about this is though setting an ‘import_id’ on wp_insert_post

$  json = json_decode("{         \"tt1412213\":{            \"title\":\"Movie\",            \"rating\":\"excellent\"         }     }", true);  foreach($  json as $  item) {      $  itemID = array_keys($  filmJson, $  item);     if (get_post_status( $  itemID ) == false ) {         if($  item["title"] and $  item["rating"]){             global $  user_ID;             wp_insert_post(array(                 'post_title' => $  item["title"],                 'post_content' => $  item["rating"],                 'post_status' => 'publish',                 'post_date' => date('Y-m-d H:i:s'),                 'post_author' => $  user_ID,                 'post_type' => 'post',                 'post_category' => array(0),                 'import_id' => $  itemID             ));         }     } } 

I would like my post to have the ID tt1412213 but it defaults to a number instead. Anything I’m missing?

Can’t add script

New to Unity and got this issue. I was watching a Brackey’s video and copying code as we go along. So I am really stumped as to why I am having this issue.

Here is the video I am following: https://www.youtube.com/watch?v=LNLVOjbrQj4&list=PLTHsiRqYA67RzooCpDItsPE3-yNM7J5vJ&index=2&t=412s

at 4:58 seconds he adds this script to the player and starts moving. When I add my script I get the "Can’t add script" error.

I have read other post about this and Have copied and pasted my script name and even tried changing it too. No luck. I have restarted Unity as well thinking it could be some kind of bug. Not that either. I will post my code down below if somebody can help me out that be so greatenter image description here

Strategies when DBCC CheckDB REPAIR_ALLOW_DATA_LOSS can’t repair a database

To get it out of the way, in this scenario we are repairing a number database where no backups were taken from before the corruption, so restoring a backup is not an option. Not my database 🙂

Upon running DBCC CHECKDB with REPAIR_ALLOW_DATA_LOSS we get thousands of errors that look like this:

Msg 8928, Level 16, State 1, Line 7 Object ID 2105058535, index ID 1, partition ID 72057594038779904, alloc unit ID 72057594039762944 (type LOB data): Page (1:24911) could not be processed.  See other errors for details.         Repairing this error requires other errors to be corrected first. Msg 8965, Level 16, State 1, Line 7 Table error: Object ID 2105058535, index ID 1, partition ID 72057594038779904, alloc unit ID 72057594039762944 (type LOB data). The off-row data node at page (1:24911), slot 0, text ID 265289728 is referenced by page (1:24820), slot 0, but was not seen in the scan.         Repairing this error requires other errors to be corrected first. Msg 8928, Level 16, State 1, Line 7 Object ID 2105058535, index ID 1, partition ID 72057594038779904, alloc unit ID 72057594039762944 (type LOB data): Page (1:24912) could not be processed.  See other errors for details.         Repairing this error requires other errors to be corrected first. Msg 8965, Level 16, State 1, Line 7 Table error: Object ID 2105058535, index ID 1, partition ID 72057594038779904, alloc unit ID 72057594039762944 (type LOB data). The off-row data node at page (1:24912), slot 0, text ID 265289728 is referenced by page (1:24820), slot 0, but was not seen in the scan.         Repairing this error requires other errors to be corrected first. Msg 8928, Level 16, State 1, Line 7 Object ID 2105058535, index ID 1, partition ID 72057594038779904, alloc unit ID 72057594039762944 (type LOB data): Page (1:24913) could not be processed.  See other errors for details.         Repairing this error requires other errors to be corrected first. 

Running it repeatedly does not reduce the errors, so it looks like DBCC cannot repair this.

My next thought was to try and identify and delete the problematic rows in the table. When I tried deleting a known-problematic row though, it also errored, so my current thought is to extract known-good rows into a new table with the same schema as the old, drop the old table and rename the new one to match the old one.

The problem with this is that SQL Server, instead of providing a catchable error, simply drops the connection whenever a problem row is encountered, so I can’t seem to find a programmatic way to identify the ‘good’ rows.

Is there any way in T-SQL to force it to provide a nice catchable error so I can iterate through the table and pull out the good rows, or some ‘advanced’ mode of DBCC CHECKDB that might be able to repair it that isn’t obvious anywhere on the web?

Cant get wordpress to work on subdirectory

I have an ubuntu server.

I already had nginx and some page there which works.

I wanted to add wordpress on /blog path

I installed wordpress using this setup https://ubuntu.com/tutorials/install-and-configure-wordpress#1-overview

(I didnt start step 7 because i cant get the page to show up)

With the setup wordpress lives in /srv/www/wordpress where i see index.php and everything else

i did modify my nginx conf file

server {      root /var/www/example;    server_name example.com www.example.com;    index index.html index.htm index.nginx-debian.html;    ...    location / {     try_files $  uri $  uri/ =404;   }    location ^~ /blog {     root /srv/www/wordpress;     index index.php;     try_files $  uri $  uri/ /index.php?$  args;      location ~ \.php$   {         try_files $  uri =404;         include       fastcgi_params;         fastcgi_pass  127.0.0.1:8090;     }   }    ... 

The new part is location ^~ /blog ... and i am unsure how it should look like.

Right now as it is if i go to example.com/blog the browser offers me to download some file. (its a short php file with the name "download")

Thx for any suggestions

Yoast not recognizing custom post type slug and I can’t change archive page title

I am using CPT UI and I have a custom post type "interview" and had the archive slug set to default which would be /interview/. Yoast was working fine but then I updated the archive slug to /interviews/ and my page title no longer works. It now shows "Blog | [site name]". My Yoast settings are still correct for that custom post type archive page.

I’ve tried manually rewriting it with:

    add_filter('wpseo_title', 'filter_product_wpseo_title'); function filter_product_wpseo_title($  title) {     if(  is_post_type_archive('interview') ) {            $  title = 'Interviews';     }     return $  title; } 

but it doesn’t work. Any ideas? How can I force a change in a page template or make Yoast work?

How to see individual events in GA4 reporting (or universal if I can’t do it in ga4)

I have a conversion event in GA4 called "outgoing clicks" to track outgoing clicks. By clicking on "engagement->conversions" I can see that the event is working and I can group them by source or by some other method. What I can’t do is just see the events as rows. What I want is just to see essentially a flat table where each event is a row that looks like this:

event_action  event_category  event_label timestamp {action}  {category} {label} 7/27/2021 10:34:33 {action}  {category} {label} 7/27/2021 10:35:00 {action}  {category} {label} 7/27/2021 10:36:11 {action}  {category} {label} 7/27/2021 10:37:55 {action}  {category} {label} 7/27/2021 10:38:44 

What’s the best way to do this? Why is this so hard? It’d seem like the most common use case for this data would be to want to see them as rows.

Can’t turn off two-factor authentication using CLI

I got a new phone and didn’t save the recovery code. One day, when I tried to log in to the Heroku platform using my email and password, Heroku redirected to the https://verify.salesforce.com/v1/verify/ page and asked me to perform multi-factor authentication and enter verification code.

I can’t. So I find this documentation Recovering from lock-out

What I have tried:

  1. Contact the support account-lockout@heroku.com via email, ask them to disable my multi-factor authentication. I provided my login email and password to them. But they always reply to me like this:

Sorry, the email address you are using has not been recognized as a Heroku account.

Please log in and submit a ticket via help.heroku.com where we’ll be happy to help. If you are unable to log in, please send an email from your registered Heroku account.

If you do not have a Heroku account and need support, you can create an account in seconds.

We apologize for any inconvenience!

The Heroku Team https://heroku.com

  1. The documentation said:

If you have a valid CLI session on your computer, you can use the CLI to turn off two-factor authentication with the command heroku 2fa:disable. Here too, you will be asked for your password.

So I tried to disable multi-factor authentication using heroku CLI.

☁  heroku 2fa:disable (node:42222) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification. Disabling 2fa on novaline@aliyun.com... ? Password: ************ Disabling 2fa on novaline@aliyun.com... done 

Looks like it worked. But when I tried to log in to the Heroku platform again, it still redirected me to the multi-factor authentication page – https://verify.salesforce.com/v1/verify/

Am I the only one with this problem?

Can’t receive emails from previously subscribed websites

since I changed my host, I cant receive emails from previously subscribed websites. The email address is exactly the same, which is my personal domain name email. I can send and receive emails with no problem, but I no longer receive emails from previously signed up websites, and this is a huge problem for me especially with my Instagram account, cause I forgot the password, and recovery email doesn’t deliver

Multisite: menus can’t be added in child sites

It seems that we cannot add menus in child sites in multisite. Did anyone face this issue before?

I have the Menu container enabled in my functions.php

register_nav_menus(     array(         'primary-menu' => __( 'Primary Menu' ),         'secondary-menu' => __( 'Secondary Menu' )     ) ); 

I can add menus to the parent site. But I can’t do it in the child sites even though I can see the Menu container and the Create Menu button.

No menu is created when the Create Menu button is clicked. WordPress just refreshed the page and the menu I tried to create is not present at all.

I have inspected the database of my child site and I can’t find any row for nav_menu_item.

Any ideas?

EDIT:

I also found out that I cannot add any category or tag in my child sites. Why??

Can’t remove “synchronizing/suspect” database after removed from availability group Sql Server 2019 Enterprise

I’ve removed a db from a synchronous availability group.The db shows "synchronizing/suspect" as it should. I’m trying to remove this database cannot. I have tried:

DROP DATABASE [db1]; 

but get "Cannot drop database "db1" because it is currently in use.". even though their are no sessions using this database.

ALTER DATABASE [db1] SET OFFLINE; 

but get "ALTER DATABASE failed because a lock could not be placed on database ‘db1’. Try again later."

ALTER DATABASE [db1] SET SINGLE_USER WITH ROLLBACK IMMEDIATE 

but get "ALTER DATABASE failed because a lock could not be placed on database ‘db1’. Try again later."

ALTER DATABASE [db1] SET EMERGENCY; 

ALTER DATABASE failed because a lock could not be placed on database ‘db1’. Try again later.

This is a 24/7 production db and restarting is not a good option.

Any advice?