Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The field module is not being included, but should be.
Here’s a fix:
--- shs.module
+++ Current File
@@ -34,7 +34,7 @@
'access callback' => 'user_access',
'access arguments' => array('access content'),
'includes' => array('path'),
- 'dependencies' => array('taxonomy'),
+ 'dependencies' => array('taxonomy','field'),
),
);
}
Comment | File | Size | Author |
---|---|---|---|
#9 | shs-js_integration_fix-2184279-9.patch | 410 bytes | Alex Bukach |
#4 | shs-js_integration_fix-2184279-4.patch | 386 bytes | rooby |
Comments
Comment #1
4fs CreditAttribution: 4fs commentedSurely this is an easy commit and should be included in dev at least? Without this the integration with High-performance JavaScript callback handler is actually broken and renders shs not to work. This seems rather critical?
Comment #2
bialy12 CreditAttribution: bialy12 commentedI would like to ask for some help. I am using SHS with the patch that you provided (Thank you for that) but i am having issues with i18n translation of taxonomy terms while using High-performance JavaScript callback handler with SHS on Views exposed filters. The site is bilingual. Funny thing is that when i turn off High-performance JavaScript callback handler everything works great. Maybe solution is quite simple but i am a newbie to Drupal and would appreciate any help. Thank you in advance
Comment #3
Stasko2 CreditAttribution: Stasko2 commentedI'm having the same problem - shs doesn't work as Views Exposed Filter when JS Callback Handler is enabled. Would appreciate any help in this.
Comment #4
rooby CreditAttribution: rooby commentedHere is a patch of the above change.
Fixes the issue for me but I know nothing about the js module or the shs module so have not done technical review.
Comment #5
rozh CreditAttribution: rozh commentedThank you for the patch.
It works now.
Comment #6
Alex Bukach CreditAttribution: Alex Bukach commentedPatch from #4 works for me too.
Comment #7
ar-jan CreditAttribution: ar-jan commentedThanks @igorski for spotting this (and @rooby for the patch).
I can confirm the patch in #4 fixes the problem, +1 RTBC.
Without it the SHS widget does not appear (for both a node/edit form and views exposed filter).
Comment #8
joelpittetRTBC +1
This patch fixed my issue I posted here: #2335865: js + shs + entity cache throws E_ERROR: Call to undefined function field_attach_load()
Comment #9
Alex Bukach CreditAttribution: Alex Bukach commentedIf shs uses https://www.drupal.org/project/js to load terms lists, and shs js callback is the first function that loads a term after clearing cache, term fields appear empty as a result of such load. Further loads of the same term from any module uses cached object and hence get empty fields as well. This is because of missing dependency on field_sql_storage (in addition to 'fields' dependency), which loads fields.
Comment #10
joelpittetSounds well thought out, back to RTBC for #9
Comment #12
stBorchertThanks for the patches. I've committed the patch from comment #2184279-9: High-performance JavaScript callback handler integration is broken to 7.x-1.x.
Comment #14
GAtherton CreditAttribution: GAtherton commentedHave encountered this problem recently while trying to get JavaScript callback handler working to boost performance of shs in a view - as soon as I update .htaccess the shs select panels disappear!
Installed the developmental version of shs (as the JavaScript callback handler project page recommends this to fix this issue) but this version of shs failed to filter when used in views! The selection term load and seem to function correctly but when selected no filtration happens!
No further forward as yet but if I can work out how to apply patches I will try the code in this discussion.