Dolphiq / craft-plugin-redirect

Craft 3 redirect plugin provides an easy way to enter and maintain 301 and 302 redirects and 404 pages. The plugin provides a clear user interface for admin and non-admin users.
MIT License
54 stars 34 forks source link

Get selected Site from current site in multisite #95

Open mijewe opened 5 years ago

mijewe commented 5 years ago

When using multisite, and adding a new redirect, the Site selected in the Site dropdown is always the default Site, but it would be nice if it was the Site I'm currently "on" as per Craft's site switcher.

Explainer video: https://www.loom.com/share/ca4aac3f15c14526b3038e28db8ab784

Thanks!

adamhenretty commented 5 years ago

@mijewe Did you also find that when you changed the site from the default to add a redirect, it actually added it to the default site anyway, and you have to go back into the redirect and save it a second time with the correct site selected for it to work? I have this issue on a number of multisite installs.

mijewe commented 5 years ago

No, that's not been the case for me.

I'll keep an eye out for it though, thanks!

MarcelWeidum commented 5 years ago

I have the same issue. It's inserting it for the other site which i didn't select..

jayhlee commented 4 years ago

I'm having a similar issue. On my multisite setup, when I create a redirect and select a non-default site from the site dropdown, the redirect is created for the default site. And when I try to edit and save the redirect to the correct non-default site, I get the following error.

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null in /mysite/test/vendor/yiisoft/yii2/db/Command.php:1290