Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
7.x-3.5
Component:
block displays
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 May 2011 at 09:12 UTC
Updated:
18 Dec 2015 at 09:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
aiphesmore info, after exporting the view to a different install, class name still the same...so perhaps the origin is in the view, exemple : http://www.lycee-caucadis.com/node/4
an idea to fix this ?
thanks
Comment #2
merlinofchaos commentedThe classname of a block is based upon the 'delta' of the block. That is the unique identifier used to control which block it is. Drupal does this automatically.
Views uses the view name, a dash, and the display ID to identify blocks.
However, Drupal limits the delta to 32 characters. View names can be 32 characters and display ids can be 32 characters, meaning that the delta, for Views, can be up to 65 characters. That doesn't fit into 32. If the delta Views detects is > 32 characters, it converts this to an md5 hash so that it will fit.
In order to make the block delta not be a hash, you must ensure that the view, dash and display id combination will be 32 characters or less.
Comment #3
aiphesok but why its the first time in 2 years that i see that ? usually i've a name and the block id...but here nothing of that...strange isnt ?
Comment #4
merlinofchaos commentedMaybe this is the first time in 2 years you've had a view name + display id > 32 characters
Comment #5
aiphesok i'll see about the name..i missunderstood i guess...
EDIT: i think i understand...
am i right ?
Comment #7
doublejosh commentedHijacking...
Would also be lovely to have the view name among the classes without a theme layer solution ala:
Whop, found this post's rightful home: #1296768: How to add a CSS Class to the outer-most div of a block created using Views?
Comment #8
anybodyThe problem still exists for views blocks, even in the latest D7 version.
Screenshot of the problem is attached. The mail problem I see is that the section has no class regarding the view name. The numeric ID is dangerous in my eyes because:
1. Really really bad readable/understandable in Stylesheets for example (Comment required)
2. Has a "non persistent"
3. Can't be controlled by users.
Is it possible perhaps to set the class name given in the view or something like this?
Screenshots attached. The views export also:
Comment #9
merlinofchaos commentedYou apparently didn't pay attention.
If your view name + display name > 32 characters, you get an MD5. *there is no other alternative* because that is a length limit imposed by Drupal core. Your ONLY alternative is to use shorter view names and shorten your display IDs.
This cannot be 'fixed' to your satisfaction any other way.
Comment #10
brightboldA HA! I've been wondering for years what caused this. Mystery solved ... and display names shortened.
Comment #11
anybodyMy mistake. It was too late, as it seems. I should have read better. Sorry and thanks a lot for clarification.
Comment #12
Myko commentedИ так если коротко то данная проблема заключаеться в том что иногда при попытке сделать теминг блока hook_theme_suggestion предлагает довольно странное имя для tpl что-то типа block-views-738b11b0ba889cadf3ac3a104c7ff576.tpl.php
Это происходит изза того что если имя вашей view + машинное имя блока > 32 символов то вместо имени береться MD5. Решаеться просто, делаете машинное имя вьюшки и блока покороче :)
Для поиска
- Друпал странное имя блока вьюс (view)
- Drupal view block stange name
- MD5 в имени блока