when i Add tab as a view tab i select a view for the tab and get an error from Display as i select Master(default) or a block, the tab cannot be created and says "

An illegal choice has been detected. Please contact the site administrator.

" what can be the possible reason i encounter this type of error.
thanks if you understand my problem.

Comments

maaz_dev created an issue. See original summary.

maaz_dev’s picture

It can be solved by apply a view but as a block plugin tab this worked for to create the block tabs.

pratik_kamble’s picture

Work around suggested by @maaz_dev works for me.

kris77’s picture

I have solved with solution suggested by @maaz_dev too, but the problem with VIEW TAB remains.

foundacion’s picture

i don't believe your workaround works if the view has contextual filters.

foundacion’s picture

Actually, it does work with conceptual filters. You just have to remember to go to the contextual filter settings and in the section What to do if the URL is not available select Provide default value and select Raw value from URL from the dropdown box.

artemboiko’s picture

StatusFileSize
new1.63 KB

It was a problem with user input. Patch attached

artemboiko’s picture

Status: Active » Needs review
g089h515r806’s picture

I could not reproduce this issue. It works fine in my Drupal site.

artemboiko’s picture

Could you try on fresh latest drupal core?

g089h515r806’s picture

I use it on Drupal 9.0.6.

abdhomsi’s picture

StatusFileSize
new1.48 KB

Patch for the latest dev updates

artemboiko’s picture

@abdhomsi could you add steps to reproduce, your drupal version?

Seems like @g089h515r806 cannot reproduce the bug

sara.hussien’s picture

StatusFileSize
new1.93 KB
sara.hussien’s picture

StatusFileSize
new1.97 KB
brandonratz’s picture

Patch #7 works on Drupal 8.9.7

I do receive the following notice after I save the form. This could be unrelated.

Notice: unserialize(): Error at offset 10304 of 31217 bytes in Drupal\Component\Serialization\PhpSerialize::decode() (line 21 of /app/drupal/web/core/lib/Drupal/Component/Serialization/PhpSerialize.php)
dennis cohn’s picture

Patch #7 also works on Drupal 8.9.10.
Patch #15 didn't work.

I also got the notice:
Notice: unserialize(): Error at offset 10304 of 31217 bytes in Drupal\Component\Serialization\PhpSerialize::decode() (line 21 of /app/drupal/web/core/lib/Drupal/Component/Serialization/PhpSerialize.php)

kris77’s picture

Patch #7 works for me too on Drupal 8.9.11, but I also got the notice:
Notice: unserialize(): Error at offset 6738 of 21743 bytes in Drupal\Component\Serialization\PhpSerialize::decode() (line 21 of core/lib/Drupal/Component/Serialization/PhpSerialize.php).

EDIT:
with VIEW TAB you have to choose a page display or other, I you choose "block" it is not displayed. You have to clear the cache to see the blocks in the created BLOCKTAB.

g089h515r806’s picture

notice: unserialize(): Error at offset 6738 of 21743 bytes in Drupal\Component\Serialization\PhpSerialize::decode() 

this issue is exist when using PHP 7.3, similar issues:
https://www.drupal.org/project/rules/issues/3036623

https://www.drupal.org/project/facets/issues/3146507

g089h515r806’s picture

Status: Needs review » Fixed

I test with latest code, It works with Drupal 10 and php 8.1.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.