The Views filter "Available on Current Domain" doesn't instanciate - you get a second or so of the animation and nothing happens. I had experienced so many issues with the previous version of Domain, that I rebuilt the site from scratch - all has been working great until this.
I'm hoping the issue can be easily reproduced.
The Domain filter is my prime means of sharing content (using the same view), so I'm marking this as major. It certainly is for me.
I don't know how my host (Imageleet) found this, but they detected the following error in the earlier installation. This looks like the same problem.
PHP Fatal error: Type of Drupal\domain_access\Plugin\views\filter\DomainAccessCurrentAllFilter::$value_value must be string (as in class Drupal\views\Plugin\views\filter\BooleanOperator) in /[site]/web/modules/contrib/domain/domain_access/src/Plugin/views/filter/DomainAccessCurrentAllFilter.php on line 17
Any suggestions greatly appreciated!
| Comment | File | Size | Author |
|---|---|---|---|
| #41 | domain-available-on-current-domain-doesnt-instantiate-3367785-41.patch | 1.97 KB | nicolas-lsn |
Issue fork domain-3367785
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
agentrickardWhat version of PHP is this? What version of Drupal?
Comment #3
bcobin commentedDrupal 10.0.9 and PHP 8.1.20 - thanks fer' askin!
Comment #4
agentrickardThis looks like strict type checking for two parameters that were added in Drupal 10.
Comment #5
bcobin commentedSounds good to me - thanks for the response!
UPDATE: YAY!
Bingo. The filter instanciates, anyway - I'll be checking it going forward.
Thanks so much! Back to work... :)
Comment #6
bcobin commentedUPDATE: If you try invoking on all displays in a given view, it instanciates on only the targeted view and content fails to display. If you invoke on individual displays, though, it seems to work fine.
I'll take it. Thanks!
Comment #7
super_romeo commentedPatch #4 fixed the issue.
Comment #8
vzamko commentedPatch #4 works for me.
Comment #9
dqdConfirm it as RTBC. Apart from that a notice of importance: in circumstances it can become a deal-beaker for updating Drupal from 9 to 10 since the database update required will trigger this issue and break the final db update. Applying the patch and re-trying to update database after core and modules update runs complete without flaws. 1+ for this issue fixed so quickly!
Comment #10
spuky commented+1 for RTBC fixed problems with D10 upgrade
Comment #11
r81d3r commented+1 RTBC
Comment #15
ash2303 commentedWhile patch #4 works fine, I think we don't need to re-declare properties again.
Updating patch, hope it works!
Comment #16
drupalfan2 commentedI needed patch #15 in order to get it run after Drupal 10 Upgrade.
Patch #4 is also working.
Comment #17
agentrickardThe two patches need to be reconciled, since #15 is actually a different issue.
Comment #18
bwilliams1992 commentedTested on Drupal 10.1.6 after upgrade from Drupal 9.5.11 and patch #4 worked
Php version 8.1.18
10.3.27-MariaDB
nginx/1.17.10
Comment #19
ash2303 commentedBoth patches will work fine.
#4 was created before base class is updated
#15 is created after base class is updated
So as per latest base class change we need patch #15, we don't need to re-declare base class properties.
Refer: https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/modules/vie...
Comment #20
agentrickardI'm looking for one clean patch.
Comment #21
agentrickardI see the problem.
https://git.drupalcode.org/project/drupal/-/blob/9.5.x/core/modules/view...
https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/modules/vie...
This was fixed in Drupal core, v 10.x (patch 15). If we commit that, we may break BC with Drupal 9.5, which does not have that (patch 4).
I think the best option is to commit #15. But that might throw some warnings on PHP 8.2 / Drupal 9.5. Not sure we can do anything about that.
Comment #23
ankondrat4 commentedHello.
+1 RTBC for patch #14 and MR !56 on Drupal 10.
Comment #24
dqdThanks for all the work in here. But - Please do not review your own work. First of all patches and merges should be made against latest dev. Second, there are no further comments if anything of #20 & #21 has been addressed yet. Also I would like to read opinions if the attempts here overlap somehow with: #3413610: Fatal error: Type $value_value must be string DomainAccessCurrentAllFilter.php on line 0
Comment #25
capysara commentedI'll try to summarize the current status.
I'm hiding the patches to avoid confusion going forward.
The current MR just applies the patch from #15 and moves it into a MR. That should address #20 "one clean patch." I'm assuming that the comment meant one clean patch/MR, but if it literally meant "patch," then my apologies for muddying the issue.
RE: #21 I agree with this. It might throw warnings (on EOL D9), but it shouldn't break things.
RE: #24, you're right, this issue definitely overlaps with 3413610. It's the same problem, and they addressed it in the same way as #4 in this issue.
I'm closing the other as a duplicate.
I've successfully used the MR so I'm setting to RTBC.
Comment #26
spuky commentedadded a fix for an error in the same file during a D 10.3 update but there is also the same fix in 3456123
should I revert my commit ?
Comment #27
spuky commentedreverted my commit to keep thing sepperate
Comment #28
agentrickardThis needs a refactor against 2.0.x
Comment #31
webflo commentedhttps://git.drupalcode.org/project/domain/-/merge_requests/85 is ready.
Comment #32
davps commentedIn this case (#21), the best solution is to use a separate main tag to ensure backward compatibility.
The main problem is the changed scope of the options method. If we remove the override of this method in the filter, we can forget about the backward compatibility issue.
The interface difference is small and may be worth ignoring to forget about the backward compatibility issue at this point:
However, MR 85 looks good to me
Comment #33
davps commentedComment #34
webflo commentedThe problem with the operator selection is that the query does not support the "!=" option. Therefore, "=" must always be selected.
Comment #35
agentrickardNow I wonder if this causes any changes to configuration of existing views.
Testing. {update: it does not]
Comment #36
agentrickardMR 85 threw an error on 10.3.
Investigating.
Comment #37
agentrickardI have updated MR 85 to use a public method for
function operators().This should be RTBC; Drupal 9 support was dropped last year.
https://www.drupal.org/docs/understanding-drupal/drupal-9-release-date-a...
Comment #39
agentrickardMerged
Comment #41
nicolas-lsn commentedPatch for the current 2.0.0-beta1, awaiting the next release.