I think graphics design is also an underrated business that is very lucrative because all companies and business, whether small or big, online or offline demands for a graphic designer, for branding designs, logo designs, posters designs, web designs and other form of designs used for advertisement. So, I think graphics design is really underated in the business world.

## Error when copying a product or moving a category: The value specified in the URL Key field would generate a URL that already exists

``````Migrated Magento 1.9.4 --> Magento 2.4.2-p1
``````

We migrated all data except orders from our production Magento 1.9.4 site to Magento 2.4.2-p1. Everything seems to work in the new Magento except when we copy an existing product or when I tried to move a category into another category, I get the following Error:

``````The value specified in the URL Key field would generate a URL that already exists.
To resolve this conflict, you can either change the value of the URL Key field (located in the Search Engine Optimization section) to a unique value, or change the Request Path fields in all locations listed below:

and then 9 products listed here
``````

I googled this but all I find are never ending discussions and super-complicated steps to try. Is there a simple to implement solution I could do to fix this?

Here are my entries from exception.log:

``````(2021-08-01 15:49:02) main.CRITICAL: URL key for specified store already exists. {"exception":"(object) (Magento\UrlRewrite\Model\Exception\UrlAlreadyExistsException(code: 0): URL key for specified store already exists. at /home/myWEBSITE/public_html/vendor/magento/module-url-rewrite/Model/Storage/DbStorage.php:309, Magento\Framework\Exception\AlreadyExistsException(code: 0): URL key for specified store already exists. at /home/myWEBSITE/public_html/vendor/magento/module-url-rewrite/Model/Storage/DbStorage.php:342, Magento\Framework\DB\Adapter\DuplicateException(code: 1062): SQLSTATE(23000): Integrity constraint violation: 1062 Duplicate entry 'fabbri-amarena-cherries-panettone-1000-gram-www-MYstore2-com.' for key 'MGET_URL_REWRITE_REQUEST_PATH_STORE_ID', query was: INSERT  INTO `mget_url_rewrite` (`redirect_type`,`is_autogenerated`,`metadata`,`description`,`entity_type`,`entity_id`,`request_path`,`target_path`,`store_id`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?) at /home/myWEBSITE/public_html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:599, Zend_Db_Statement_Exception(code: 23000): SQLSTATE(23000): Integrity constraint violation: 1062 Duplicate entry 'fabbri-amarena-cherries-panettone-1000-gram-www-MYstore2-com.' for key 'MGET_URL_REWRITE_REQUEST_PATH_STORE_ID', query was: INSERT  INTO `mget_url_rewrite` (`redirect_type`,`is_autogenerated`,`metadata`,`description`,`entity_type`,`entity_id`,`request_path`,`target_path`,`store_id`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?) at /home/myWEBSITE/public_html/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:110, PDOException(code: 23000): SQLSTATE(23000): Integrity constraint violation: 1062 Duplicate entry 'fabbri-amarena-cherries-panettone-1000-gram-www-MYstore2-com.' for key 'MGET_URL_REWRITE_REQUEST_PATH_STORE_ID' at /home/myWEBSITE/public_html/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:91)"} ()
(2021-08-01 15:49:03) main.WARNING: Cannot gather stats! Warning!stat(): stat failed for /home/myWEBSITE/public_html/pub/media/catalog/product/f/a/fabbri_amarena_cherries_panettone_1000_gram_www.MYstore2.com_2.jpg {"exception":"(object) (Magento\Framework\Exception\FileSystemException(code: 0): Cannot gather stats! Warning!stat(): stat failed for /home/myWEBSITE/public_html/pub/media/catalog/product/f/a/fabbri_amarena_cherries_panettone_1000_gram_www.MYstore2.com_2.jpg at /home/myWEBSITE/public_html/vendor/magento/framework/Filesystem/Driver/File.php:95)"} ()
(2021-08-01 15:49:19) main.WARNING: Cannot gather stats! Warning!stat(): stat failed for /home/myWEBSITE/public_html/pub/media/catalog/product/f/a/fabbri_amarena_cherries_panettone_1000_gram_www.MYstore2.com_2.jpg {"exception":"(object) (Magento\Framework\Exception\FileSystemException(code: 0): Cannot gather stats! Warning!stat(): stat failed for /home/myWEBSITE/public_html/pub/media/catalog/product/f/a/fabbri_amarena_cherries_panettone_1000_gram_www.MYstore2.com_2.jpg at /home/myWEBSITE/public_html/vendor/magento/framework/Filesystem/Driver/File.php:95)"} ()
(2021-08-01 15:50:43) main.CRITICAL: URL key for specified store already exists. {"exception":"(object) (Magento\UrlRewrite\Model\Exception\UrlAlreadyExistsException(code: 0): URL key for specified store already exists. at /home/myWEBSITE/public_html/vendor/magento/module-url-rewrite/Model/Storage/DbStorage.php:309, Magento\Framework\Exception\AlreadyExistsException(code: 0): URL key for specified store already exists. at /home/myWEBSITE/public_html/vendor/magento/module-url-rewrite/Model/Storage/DbStorage.php:342, Magento\Framework\DB\Adapter\DuplicateException(code: 1062): SQLSTATE(23000): Integrity constraint violation: 1062 Duplicate entry 'fabbri-amarena-cherries-panettone-1000-gram-www-MYstore2-com.' for key 'MGET_URL_REWRITE_REQUEST_PATH_STORE_ID', query was: INSERT  INTO `mget_url_rewrite` (`redirect_type`,`is_autogenerated`,`metadata`,`description`,`entity_type`,`entity_id`,`request_path`,`target_path`,`store_id`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?) at /home/myWEBSITE/public_html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:599, Zend_Db_Statement_Exception(code: 23000): SQLSTATE(23000): Integrity constraint violation: 1062 Duplicate entry 'fabbri-amarena-cherries-panettone-1000-gram-www-MYstore2-com.' for key 'MGET_URL_REWRITE_REQUEST_PATH_STORE_ID', query was: INSERT  INTO `mget_url_rewrite` (`redirect_type`,`is_autogenerated`,`metadata`,`description`,`entity_type`,`entity_id`,`request_path`,`target_path`,`store_id`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?) at /home/myWEBSITE/public_html/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:110, PDOException(code: 23000): SQLSTATE(23000): Integrity constraint violation: 1062 Duplicate entry 'fabbri-amarena-cherries-panettone-1000-gram-www-MYstore2-com.' for key 'MGET_URL_REWRITE_REQUEST_PATH_STORE_ID' at /home/myWEBSITE/public_html/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:91)"} ()
(2021-08-01 15:50:44) main.WARNING: Cannot gather stats! Warning!stat(): stat failed for /home/myWEBSITE/public_html/pub/media/catalog/product/f/a/fabbri_amarena_cherries_panettone_1000_gram_www.MYstore2.com_2.jpg {"exception":"(object) (Magento\Framework\Exception\FileSystemException(code: 0): Cannot gather stats! Warning!stat(): stat failed for /home/myWEBSITE/public_html/pub/media/catalog/product/f/a/fabbri_amarena_cherries_panettone_1000_gram_www.MYstore2.com_2.jpg at /home/myWEBSITE/public_html/vendor/magento/framework/Filesystem/Driver/File.php:95)"} ()
(2021-08-01 18:08:19) main.WARNING: Cannot gather stats! Warning!stat(): stat failed for /home/myWEBSITE/public_html/pub/media/catalog/product/f/a/fabbri_amarena_cherries_panettone_1000_gram_www.MYstore2.com_2.jpg {"exception":"(object) (Magento\Framework\Exception\FileSystemException(code: 0): Cannot gather stats! Warning!stat(): stat failed for /home/myWEBSITE/public_html/pub/media/catalog/product/f/a/fabbri_amarena_cherries_panettone_1000_gram_www.MYstore2.com_2.jpg at /home/myWEBSITE/public_html/vendor/magento/framework/Filesystem/Driver/File.php:95)"} ()
``````

I tried changing the URL Key for the first product and then moving the category again but it comes up with the same Error including a reference to the URL key of the first product (even-though I changed it already).

## linear algebra – Prove there exists a positive number \$c\$ such that \$‖v‖_1≤c‖v‖_2\$ for all \$v∈V\$.

Suppose $$V$$ is finite-dimensional and $$〈·,·〉_1$$, $$〈·,·〉_2$$ are inner
product on $$V$$ with corresponding norms $$‖·‖_1$$ and $$‖·‖_2$$. Prove
there exists a positive number $$c$$ such that $$‖v‖_1≤c‖v‖_2$$ for all
$$v∈V$$.

{This problem is from Axler’s “Linear Algebra Done Right.”}

I just wonder why all the experts’ answers use an orthonormal basis to prove this, while I just thought this could be proved as follows.

Proof starts.

Consider when $$v=0$$.

Then, by the definition of the inner product, $$left | v right |_1=left | v right |_2=0$$.

Thus, for any positive number $$c$$, $$left | v right |_1 leq cleft | v right |_2$$

Now, consider $$v neq 0$$.
Then let $$left | v right |_1=a ,left | v right |_2=b$$ for an arbitrary non-zero vector $$v$$.

But, note that $$a,b>0$$ by the definition of the inner product.

Thus, for $$c geq frac{a}{b}$$, we get $$a leq c b$$ $$Leftrightarrow left | v right |_1 leq cleft | v right |_2$$.

Hence, for any $$vin V$$, we can find a positive number $$c$$ s.t $$left | v right |_1 leq cleft | v right |_2$$. $$blacksquare$$

Is there something I’m missing here?

## elementary number theory – Prove that there exists infinitely many positive integers that cannot be expressed as a sum of three squares.

Prove that there exists infinitely many positive integers that cannot be expressed as a sum of three squares. I understand how to do this when you are supposed to prove that there exists infinitely many positive integers that cannot be expressed as a sum of two squares, but not with three. Is this proof related to the proof for two squares? Could you please write out the entire proof, or at least the parts that are necessary? Any help would be appreciated! Thank you!

## .htaccess – htaccess rewrite /dir/*.jpg to /dir/webp/*.webp only when webp file exists

I’m trying to rewrite all website files (.jpg|.gif|*.png) to *.webp in a subdir, but only when the *.webp file exists. Previous and new files have the same name, only changing the extension and *.webp files are all under subdir of the original one.

1. Only matches PNG/JPG/GIF file
2. Original images dir pattern is: /site/views/00_projects/(VARIABLE MAIN DIR NAME HERE)/content/image/(VARIABLE SUBDIR NAME HERE)/*.jpg
3. New .webp dir is pattern is: /site/views/00_projects/(VARIABLE DIR NAME HERE)/content/image/(VARIABLE SUBDIR NAME HERE)/webp/.webp
4. Only rewrite IF webp file exists

I really have no idea on how to make it work. Can someone help?

## graphs – There exists a MST \$T\$ of \$G\$ with \$w\$ so \$Tsubseteq T_{1}cup T_{2}\$

Studying for my finals. I came across with the following statement:

Given two graphs $$G_{1}=left(V,E_{1}right)$$ and $$G_{2}=left(V,E_{2}right)$$, weight function $$w,:,E_{1}cup E_{2}tomathbb{R}$$ and two minimal spanning trees $$T_1$$ and $$T_2$$ by $$w$$ of $$G_1$$ and $$G_2$$ respectively. Lets define $$G=left(V,E_{1}cup E_{2}right)$$. Then there exists a MST $$T$$ of $$G$$ with $$w$$ so $$Tsubseteq T_{1}cup T_{2}$$.

This statement looks pretty obvious but the thing I’m struggling with is to write a “formal” proof. How to show this statement is true?

## polynomials – I have two equations f(u,v,k)=0 and g(u,v,k)=0. I want to find a branch (if there exists) of k(u,v) such that this system has a solution in (u,v)

I have two polynomials in `k` given by `f(u,v,k)` and `g(u,v,k)`. I know that there exists a function k=k(u,v) such that, when we evaluate this function in the system, we get a new equation `h(u,v)=0`, which defines a curve. I would like to find that solution in `k`. The problem is that, for instance, we could have that g is a fourth-degree polynomial in k and, if we extract all the roots with

``````Solve(g(u,v,k)==0,k),
``````

then it could happen that some functions `k=k(u,v)` don’t provide a solvable equation

`f(u,v,k(u,v))==0`

Up until now, what I’ve done is the following thing:

``````sols = Solve(g(u,v,k) == 0, k);
For(l = 1, l <= Length(sols), l++,
ktemp = sols((l))((1))((2));
tempcurve = f(u,v,k) /. k -> ktemp;
tempplot = ContourPlot(tempcurve == 0, {u,0,4}, {v,0,6});
If( Length(Cases(Normal@tempplot, Line(x_) :> x, Infinity)) > 0,
k = ktemp;
Break;
)
);
``````

However, as this code is plotting each implicit function for each `k`, it may take a long time. I was wondering if there is an optimal way to do this.

## real analysis – Solution Check: Determine if \$lim_{nrightarrow infty} int_X e^{-nf(x)} dmu(x) \$ exists.

I would appreciate if I could get this proposed solution checked for correctness and rigor. Here is the question:

Let $$(X,mathcal{M},mu)$$ be a finite measure space. Let $$f:Xrightarrow (0,infty)$$ be measurable. If the following limit exists, determine its value:

$$lim_{nrightarrow infty} int_X e^{-nf(x)} dmu(x).$$

If it does not, explain. In either case, justify your claims.

Here is my solution:

Since f is a non negative function notice that
$$e^{-nf(x)} leq e^{-n(0)} =e^0 =1.$$

Since $$X$$ is a finite measure space we have
$$int_X 1 dmu(x)= mu(X)

for some $$Min (0,infty)$$. Therefore by the Dominated Convergence theorem we have
$$lim_{nrightarrow infty} int_X e^{-nf(x)} = int_X lim_{nrightarrow infty} e^{-nf(x)}.$$

Suppose $$f = 0$$ a.e., then
$$int_X lim_{nrightarrow infty} e^{-nf(x)} = int_X 1 dmu(x) =mu(X).$$

On the other hand, if $$f neq 0$$ a.e., then
$$int_X lim_{nrightarrow infty} e^{-nf(x)} = int_X 0 dmu(x) =0.$$

Therefore the limit exists and we see that

$$lim_{nrightarrow infty} int_X e^{-nf(x)} dmu(x)= begin{cases} mu(X) & text{if } f= 0 text{ a.e.}\ 0 & text{if } fneq 0 text{ a.e.} end{cases}$$

## problem solving – Easy way of finding out whether or not a sub-triangle exists

If i have a triangle similar to Pascal’s triangle, except instead of row 1 and row 2 of the triangle being composed entirely of 1s, they are comprised of 3 random numbers, like this one here:

(row 1 is the top, row 2 is the row under that (the one that contains 9 and 3), and etcetera)

Then, if i know only the numbers on row 1 and 2 (4, 9 and 3), is there an easy way for me to find out whether or not a sub-triangle, which is a smaller triangle contained in the larger triangle, exists, without reconstructing the larger triangle?

I.e., In this example, the sub-triangle (21, 30, 36) exists (in orange):

Then, if i know only the numbers on row 1 and row 2, is there any easy way that I can find out whether or not the sub-triangle (21, 30, 36), exists, without reconstructing the larger triangle?

## How to unpublish a published content type in Sharepoint Online if the published content type no longer exists (deleted)

I have a SharePoint Online environment with content types being published by the content type hub. During tests, I created some content types that I mistakenly deleted before unpublishing them. Now the hub keeps publishing old content types even thought they no longer exists in the hub. I’m aware that those deleted entries are now orphans stored in the managed metadata service.

Any ideas on how to permanently delete those old content types that weren’t published prior the deletion?