I have a view with 2 blocks. One was cloned from the other. I changed the machine readable name of both of the blocks (block_events_upcoming and block_events_upcoming_ical), but in the html i get as id and classes the beautys you see below.

<div id="block-views-d7410a6d5618e2d319a0eaab549b0ff2"
     class="block block--views 

Is there a way to change the ids and classes of the block. The css-class option in advanced settings only changes the css class in the block_content div not the top block-div.

2 Answers 2


The HTML ID is generated by concatenating block-view_name-block_name and it seems there's a length limit of 32 characters. My block exceeded that limit. So for me the solution was to shorten the block-machine-name.


Have you tried to give your blocks an id through the 'advanced' fieldset of your view? on the 'other' list of settings. That might do the trick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.