Hi, I have a facetapi block with delta
-o81ct7rwJBOlUOYehFwEewaFOf2qC6K
As you can see, it starts with a "-". This somehow causes issues with modules like Collapsiblock (settings aren't saved) and other JS-related stuff.
The reason is that the full block id becomes
block-facetapi-o81ct7rwjboluoyehfweewafof2qc6k
instead of with double dashes:
block-facetapi--o81ct7rwjboluoyehfweewafof2qc6k
This means people have to write custom JS exceptions for block delta's starting with a "-".
Maybe we need to improve on the block delta generation. Views delta's never use _, - or mixed case. So I suggest using View's "delta encoding" to avoid unexpected JS issues and whatnot.
I know it's a minor detail,... I'll see if I can create a patch myself.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | facetapi-1355270-5.patch | 1.33 KB | cpliakas |
Comments
Comment #1
Anonymous (not verified) commentedFor reference: issue-free generic views block delta can look like:
eff5d581d5762980bb823a63076dd0c7Problematic FacetAPI delta:
-zDjVn3LYSmImZiqxy8UNBHRY_FiuTe-Suggestions for improvement
- no mixed case
- only a-z, 0-9
Comment #2
Anonymous (not verified) commentedI just renamed my entity property to get it a new delta, "DMKi4a8wNF5O4YGf4Sjy8rnF4G-97Hx-".
No issues with this one. Apparently, delta's really can't start with "-".
Comment #3
cpliakas commentedGreat information. Thanks for reporting. I would definitely be in favor of an a-z0-9 hash. This will require a change to the hashing algorithm as well as an update function to regenerate hashes.
Thanks for the discovery,
Chris
Comment #4
cpliakas commentedSwitching to UI, since this mostly effects jQuery.
Comment #5
cpliakas commentedTry this patch out. Run update.php after applying and see if a) the blocks still show up and b) they have alpha-numeric hashes.
Comment #6
Anonymous (not verified) commentedOk, tried this. After running the Update.php succesfully, it all worked.
Just needed to re-configure Block Theme and Context UI blocks, but that's a necessary evil. Can just make a "release note" of that.
In the end, all my problems with the ID's are solved.
Comment #7
Anonymous (not verified) commentedback to UI
Comment #8
cpliakas commentedmorningtime,
Thanks for testing! I think the upgrade path for the core Block mode works, so for a beta that is all we can hope for. If you want to work on adding support for Context UI and Block Theme I would definitely welcome that, however release notes might be good enough in these instances.
Thanks again,
Chris
Comment #9
cpliakas commentedResolved in commit 9133a63.
Comment #10
cpliakas commented