- Issue created by @Young.g
- 🇨🇦Canada joseph.olstad
Thanks for reporting @Young.g
I have confirmed that this is a bug in WxT 5.1.x
I have tested a vanilla install of WxT 5.1.x with Drupal 10.1.8 and after installing all the wxt modules and running all of the wxt migrations for gcweb and blocks that this block is listed in the manage blocks however it does NOT show up on the page.
- Assigned to joseph.olstad
- 🇨🇦Canada joseph.olstad
very strange, I've found a way to get the "Did you find" webform to show up but trying to get a better understanding of this.
It seems to be that the 'report a problem' block configuration is related to the 'Did you find what' ability to show up
- 🇨🇦Canada joseph.olstad
weird,
On wxt vanilla 5.1.x using a the combination of block layout configuration for Report a problem and Did you find what you are looking for, the "Did you find" block will show up on the page.Both Report a problem and Did you find have to be enabled and oddly enough to reliably see "Did you find" block their visibility settings had to be Unrestricted for both blocks and then a cache rebuild.
I repeated this in another non vanilla 5.1.x environment and no combination that I have tried will result in displaying the "Did you find" block.
continuing investigation.
- Status changed to Postponed
10 months ago 4:55am 23 February 2024 - 🇨🇦Canada joseph.olstad
Going to mark this as postponed for now, I was able to get the "Did you find what you were looking for" to load in a WxT 5.1.x vanilla
With that said, it seemed a bit tricky to do.
However in another environment that uses a subtheme based on wxt_bootstrap, nothing I did was able to make it work.
I did try adding a new webform block and used a cloned version of the "Did you find" form, this loaded half the form and then the next cache rebuild it was gone.
- Status changed to Active
10 months ago 8:36pm 23 February 2024 - 🇨🇦Canada joseph.olstad
Suspecting that this is a D10 regression.
There's a possible fix here:
- Status changed to Needs review
10 months ago 9:34pm 23 February 2024 - 🇨🇦Canada joseph.olstad
See patch, this fix works in my environment.
Fixes an ajax 404 error trying to load css.
see the related issue for full explanation
🐛 D10 Compatibility AddCssCommand() - AJAX error for css route of webform assets RTBC - Issue was unassigned.
- 🇨🇦Canada joseph.olstad
in addition to this patch which appears to fix something broken between D9 and D10 relating to webform 6.2.x , had to also re-implement Did you find what you were looking for. In order to have it render on the page and regain control of a version of "Did you find what you were looking for" and maintain the yes button I created a new custom module for a specific build based off of wxt_ext_webform and had to also add some of the Preprocess Block code from wxt_bootstrap into our custom subtheme.
I cloned the webform gcweb_did_you_find into custom_gcweb_did_you_find massaged the plugins /preprocess and machine references to gcweb_did_you_find to change to custom_gcweb_did_you_find , created a new block in a similar fashion
I then modified the wxt_ext_webform plugin to detach the operation of the two blocks report a problem and did you find what you were looking for
the new block has a different id
with this new setup it's working.
Something still a bit weird about the built in WxT Library form, the report problem webform is related to the gcweb find webform , tied in by the logic in wxt_ext_webform.module
anyhow, sorted it out with new code based on the wxt stuff and also theme Preprocess Block.php
something weird about the theme suggestion though, wasn't able to get that to kick in, the twig didn't seem to do anything so I used a single line declaration of css to display none on the h2 double title that doesn't actually show up when using wxt vanilla.
- 🇨🇦Canada joseph.olstad
With all that said, we needed the mentioned patch for the latest webform module release → .
- Assigned to joseph.olstad
- Status changed to Active
10 months ago 4:13pm 26 February 2024 - 🇨🇦Canada sylus
So I took a look at this and if you did a fresh install of WxT 5.2.1 all of these blocks show up correctly without needing any patch.
If I had to make a guess I wonder if your block name is different and with the block handling logic in preprocess something is behaving a bit wonky.
I'm pretty sure your problem lies somewhere in this block preprocess code and to me one of your block names must be different then what it expects.
I bet if you compare against a fresh install of 5.2.1 where this works out of the box you might be able to spot the difference.
// Determine which webform to display in footer.
$block_exists_1 = $this->checkBlockExistence('didyoufindwhatyouwerelookingfor');
$block_exists_2 = $this->checkBlockExistence('reportproblemblock');if ($block_exists_1 && $block_exists_2) {
$did_you_find_webform = $this->activateDidYouFindWebform();
$variables['display'] = TRUE;if ($did_you_find_webform) {
if ($variables['plugin_id'] == 'share_widget_block') {
$variables['attributes']['class'] = [
'col-sm-3',
'col-sm-offset-2',
'col-lg-offset-3',
];
}if ($variables['plugin_id'] == 'report_problem_block') {
$variables['display'] = FALSE;
$variables['content'] = [];
}
}
else {
if ($variables['plugin_id'] == 'find_what_you_looking_for') {
$variables['display'] = FALSE;
$variables['content'] = [];
}
}
}
- Status changed to Postponed: needs info
10 months ago 4:17pm 26 February 2024 - 🇨🇦Canada joseph.olstad
Just hit this in a different build. The report a problem block vanished.
- Status changed to Needs review
7 months ago 9:38pm 16 May 2024 - Issue was unassigned.
- 🇨🇦Canada joseph.olstad
This regression slipped in in october 2023 with commit bd23160547
- Status changed to Needs work
7 months ago 12:00am 17 May 2024 - 🇨🇦Canada smulvih2 Canada 🍁
@joseph.olstad the issue is with block caching, and the removal from the template file from your patch does fix the issue with the Did you find block, but this needs to be fixed globally for the two feedback form blocks. There are changes in the Block Preprocess file in wxt_bootstrap that needs to be reviewed as well. The change/ticket you reference toggles the two webform blocks, I think we should remove the old webform block (Report a Problem) from the block layout and just keep the Did you find webform block.
- 🇨🇦Canada joseph.olstad
lol, on one of my projects they're using the did you find
on another they're using the report a problem