I am getting a similar error:
Warning: Undefined array key "somekey" in Drupal\views_json_source\Plugin\views\exposed_form\JsonSelectOption->exposedFormAlter() (line 195 of modules/contrib/views_json_source/src/Plugin/views/exposed_form/JsonSelectOption.php).
For me, I know that it is because my view's exposed form is calling a reference but the source JSON file does NOT have that reference.
I ended up here because I see the "Note: Can use Drupal token as well." on the JSON file path setting, but when I put a token in that value, I can't even save the view. I'm getting the error:
Exception: Local file not found. in Drupal\views_json_source\Plugin\views\query\ViewsJsonQuery->fetchFile() (line 235 of modules/contrib/views_json_source/src/Plugin/views/query/ViewsJsonQuery.php).
generated from:
public function fetchFile($uri) {
$parsed = parse_url($uri);
// Check for local file.
if (empty($parsed['host'])) {
if (!file_exists(DRUPAL_ROOT . $uri)) {
throw new \Exception('Local file not found.');
...
So I headed to public function execute, right above where fetchFile is called, I can see where the replacement was supposed to happen. The comment references [site:url], so that's the token I was testing with. The replacement is not succeeding.
karenann β created an issue.
karenann β created an issue.
karenann β created an issue.
I am seeing a similar issue and I have Workflows enabled. I wondered if that were the issue.
On one content type (cta) with Workflows enabled,
+ Meta Tag and Content (Entity Reference Revisions) fields showing as edited when they weren't.
On another content type (ctb), also with Workflows enabled,
+ Meta Tag was enabled but was NOT in the list of updated fields.
+ Rabbit Hole, Menu link, and my Entity Reference Revisions field were.
+ Rabbit Hole did not appear in subsequent revisions, Menu Link and Entity Reference Revisions field did.
After disabling Workflows for that content type, Meta Tag and Entity Reference Revisions field remained in the default message -- still no Meta Tags.
Side note: These results did not correlate with whether the forms were collapsed or not and did not change with toggling collapse state.
On a third content type (ctc), there's no workflows enabled.
+ After adding a Meta Tag field, the default revision log DID include Meta Tag as being updated, even though it was not updated.
I then edited this content type to set Rabbit Hole to "Allow these settings to be overridden for individual entities," which then adds the Rabbit Hole form element to the edit form. After this, the immediately following result added "Updated the Rabbit Hole action, Rabbit Hole redirect response code, Rabbit Hole redirect fallback action, Announcement URL, and Meta Tags fields" -- this is actually expected because this is the FIRST time that form has appeared on the page, so it has to set defaults.
+ Additional revisions included only the field edited plus the errant Meta Tag that wasn't updated.
I am on Drupal 10.3.1, Metatag 8.x-1.26, Rabbit Hole 8.x-1.0, Entity Reference Revisions 8.x-1.11. Menu link is a core module.
If I had more play time, my approach would be to have a "verbose" module setting to output the diff to the Log Messages for each field.
karenann β created an issue.
karenann β created an issue.
Rolling the patch I mentioned in #19.
The following edit seems to help. Basically just does a null test. Would love a set of eyes before I roll a patch to submit. It doesn't do an isset to ensure $flat_options[$prev_key] actually exists, but I feel like that's not necessary.
diff --git a/web/modules/contrib/better_exposed_filters/src/BetterExposedFiltersHelper.php b/web/modules/contrib/better_exposed_filters/src/BetterExposedFiltersHelper.php
index 513952c90..934b1e4ae 100644
--- a/web/modules/contrib/better_exposed_filters/src/BetterExposedFiltersHelper.php
+++ b/web/modules/contrib/better_exposed_filters/src/BetterExposedFiltersHelper.php
@@ -199,7 +199,7 @@ public static function sortNestedOptions(array $options, $delimiter = '-') {
// If we are going down a level, keep track of its parent value.
if ($cur_level > $level) {
- $parent[$cur_level] = $flat_options[$prev_key];
+ $parent[$cur_level] = ($prev_key ? $flat_options[$prev_key] : $prev_key);
}
// Prepend each option value with its parent for easier sorting.
+ Drupal core 10.3.1
+ Better Exposed Filters 6.0.6
+ PHP 8.2.21
I have a nested taxonomy.
Patch 9 did not help. Patch 13 did, so I looked into why.
I am getting the error on 202 of src/BetterExposedFiltersHelper.php in Better Exposed Filters 6.0.6
200 // If we are going down a level, keep track of its parent value.
201 if ($cur_level > $level) {
202 $parent[$cur_level] = $flat_options[$prev_key];
203 }
Warning: Undefined array key "" in Drupal\better_exposed_filters\BetterExposedFiltersHelper::sortNestedOptions() (line 202 of modules/contrib/better_exposed_filters/src/BetterExposedFiltersHelper.php).
I see on line 188, before the iteration, prev_key is set to NULL:
$prev_key = NULL;
I also see on line 213, which is within each iteration, that prev_key is set to key:
$prev_key = $key;
I'm guessing, though I haven't confirmed, that with $prev_key set to NULL, the first iteration of foreach ($flat_options as $key => &$choice) { } is failing when we try to set $parent[$cur_level] to equal $flat_options[$prev_key] because that equates to setting it to $flat_options[NULL];
I'm going to tool around with this and will report back.
If your form's Settings > Submission tab is blank, check your General tab. If the option "Disable saving of submissions" is checked, this will disable "submission settings, submission limits, purging and the saving of drafts," according to the information about that setting.
I have having similar errors and tried the /rebuild.php and updb and cr etc etc:
On cr, ReflectionException: Class "\Drupal\simple_sitemap\Controller\SimpleSitemapController" does not exist in /code/web/core/lib/Drupal/Core/Entity/EntityResolverManager.php:135
On updb, it did the first two (I think) updates and failed on 8403 with: Error: Class "Drupal\simple_sitemap\Queue\SimpleSitemapQueue" not found in Drupal\Component\DependencyInjection\Container->createService() (line 259 of /code/web/core/lib/Drupal/Component/DependencyInjection/Container.php).
I'm on pantheon, like comment #37, and I looked to #30.
- I removed the simple_sitemap files
- git config core.ignorecase false
- composer require 'drupal/simple_sitemap:^4.1'
- commit and push
I did a cache rebuild which STILL threw an error, but the subsequent updb did NOT error and things seem okay.
Recently updated one of my instances to 9.5.2 and PHP 8.1.14.
I removed patch #42 from my codebase and the problem I was having reappeared. The problem I have is that, on the edit screen, the
Menu Settings > Parent link" dropdown will omit any unpublished items and all of it's children.
I applied #82 and my problem is resolved.