I'm testing this plugin in a multi-site setup, where the protected links are on site-2. Clicking a link-vault download link results in an error in Craft's log (storage/logs/web.log) stating Attempting to save an element in an unsupported site, generated by line 264 of GeneralService.php ($saveStatus = Craft::$app->elements->saveElement($element);)
To Reproduce
Steps to reproduce the behavior:
Setup two sites in Craft
Create Link-Vault protected links on the site that's not the primary site
Click that link
Potential fix
Adding the following code at the end of the elements/LinkVaultDownload.php class appears to fix the problem, but I'm not 100% sure what the knock-on effects of this might be:
public static function isLocalized(): bool
{
return true;
}
Describe the bug
I'm testing this plugin in a multi-site setup, where the protected links are on site-2. Clicking a link-vault download link results in an error in Craft's log (storage/logs/web.log) stating
Attempting to save an element in an unsupported site
, generated by line 264 of GeneralService.php ($saveStatus = Craft::$app->elements->saveElement($element);
)To Reproduce
Steps to reproduce the behavior:
Potential fix
Adding the following code at the end of the
elements/LinkVaultDownload.php
class appears to fix the problem, but I'm not 100% sure what the knock-on effects of this might be: