I cloned a view that includes a Block display, however that block display does not show up in the Blocks page, so I can't add it to pages.

For example, I cloned my "Recent News" view. renaming it "News Stream" and making some changes to the filter criteria etc. News Stream is nowhere to be found in the list of blocks.

I noticed later that when a view is cloned, it's machine name appears to stay the same. So, for example, I noticed that the machine name for Recent News page and block displays were view_page_1 and view_block_1, respectively. They were the same for News Stream. I changed them manually to news_stream_page and news_stream_block, in case the duplicate machine name was making the new block unable to be recognized by the Blocks functionality. It didn't fix the problem.

I have cleared the caches literally 20 or more times since I created this clone, in case that helped. It didn't.

CommentFileSizeAuthor
#7 clone-issue.txt21.86 KBknalstaaf
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)
For example, I cloned my "Recent News" view. renaming it "News Stream" and making some changes to the filter criteria etc. News Stream is nowhere to be found in the list of blocks.

Are you sure you saved the cloned view and cleared the cache?
There is no big technical difference beside adding and cloning a view.

I noticed later that when a view is cloned, it's machine name appears to stay the same. So, for example, I noticed that the machine name for Recent News page and block displays were view_page_1 and view_block_1, respectively. They were the same for News Stream. I changed them manually to news_stream_page and news_stream_block, in case the duplicate machine name was making the new block unable to be recognized by the Blocks functionality. It didn't fix the problem.

Sure the machine name of the display shouldn't change, but the one from view itself.

joe casey’s picture

I have run into a similar problem. I hate to say this, but it appears to me that if the machine name of the view starts with 'news_', it won't show up in the blocks list.

My test: create a view of articles called 'News Items'. Choose block but not page. Click 'Save and exit' with all defaults, don't even do 'Continue and exit'. This doesn't show up in the blocks list, although if you edit the view it looks fine.

Repeat the above but call it 'xNews Items'. It will show up in the blocks list as expected, even without clearing the caches.

esmerel’s picture

Is this still a problem with the most recent release?

dawehner’s picture

Status: Postponed (maintainer needs more info) » Fixed
, but it appears to me that if the machine name of the view starts with 'news_', it

Well this sounds a lot like a caching issue, but it it works for you in general let's mark it as fixed, as noone reported this issue for quite some time.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

knalstaaf’s picture

Version: 7.x-3.x-dev » 7.x-3.3
Status: Closed (fixed) » Active
FileSize
21.86 KB

Reporting the very same issue.

I've got three blocks that are clones of the first block ("Verwijzingsblokje 1").

Oddly enough, the second block appears in the Block overview, the third and fourth don't.

Cleared caches everytime I modified something, no result.

If you want a block to appear in the Block overview, you have to add a new display form scratch (within the same View) and configure it again.

Attch: exported view

Anonymous’s picture

Ditto. Same issue, but thanks to knalstaaf's suggestion I was able to create a new view block like the cloned view block that worked. Thanks.

cpelham’s picture

I am also having this issue.

dawehner’s picture

I just played around with cloning a view and cloning a display and all this worked without any problems for blocks.
They all appeared, if you rename something they got renamed etc.

cpelham’s picture

I made a second clone and it appeared but the first clone still has not. At least I was able to overcome the problem though.

praimmugen’s picture

Hi, I am experiencing this issue, too. I think this happens if you clone a display more than once before hitting the "Save" button.

For example: you have the block display A, you clone this display three times without saving the view and you rename the 3 cloned blocks B, C and D. Now, only the D block display should appear on the Blocks page.

Anyway, a workaround that should work and save you from having to recreate and configure from scratch all your displays can be this one: simply clone again the blocks that are not being showed, but one at the time! Save the view for every cloned block. Worked for me :)

EDIT: actually looks like what I suggested isn't totally correct. You should also change the display name and delete the original... Not very sure about what's happening, but if you play with it a bit you can get your block on the Blocks page (not a lot of fun, I know).

sjugge’s picture

Status: Active » Closed (works as designed)

I encountered this issue as well with the following specs:

bug reproducible

  • Minimal install of Drupal 7.15-dev
  • Contrib modules:
    * Views 7.x-3.3
    * Chaos Tools 7.x-1.0+35-dev
    * Flag 7.x-2.0-beta8
    * Admin Menu 7.x-3.0-rc3
    * patch 1484352-2-flag_validator_blocks_contextual_filters.patch
  • Running on MAMP stack with PHP 5.3
  • Views settings:
    * default Views settings with master display enabled

In order to have a decent walkthrough to replicate the issue I had set up a test site with the following specs:

bug not reproducible

  • Minimal install of Drupal 7.15
  • Contrib modules:
    * Views 7.x-3.5
    * Chaos Tools 7.x-1.2
    * Flag 7.x-2.0
    * Admin Menu 7.x-3.0-rc3
  • Running on MAMP stack with PHP 5.3
  • Views settings:
    * default Views settings with master display enabled

I updated the mentioned contrib modules (of the install where I could reproduce the bugs) to the latest stable releases and found that the bug has been squashed by this, I could no longer reproduce the issue. I recommend updating your codebase and, obviously, running update.php.

alphex’s picture

subscribe.

I'm seeing this with views 3.5 and ctools 1.2

I just took a view on my DEV system (laptop), heavily modified it. took the view EXPORT code and imported it to the staging server overwriting the existing view with the same view name.

the import process made all the blocks assocaited with the view (theres 9 of them, ugh) vanish from the site.

They show up in the VIEWS interface, but they don't show up in the blocks administration screen.

Everyones examples from above are matching this scenario for me.

Edit: I'm not using the FLAG module

alphex’s picture

Cloning the view recreated the blocks.

TajinderSingh’s picture

When this happens, value for region column in block table of database is missing for that particular block. If we put -1 in that column for specific block, it appears on blocks page.

So, the region value is being missed when a block display is cloned.

Hope it helps to track the issue or a quick workaround for someone who have already cloned and configured a large view display.

vramiguez’s picture

Title: Cloned View block does not show on Blocks page » Solved!!

It happened the same to me but after comparing with another block that was working, found out what was happening. Under Block Settings (in the view), I usually leave the Block Name blank so it shows None and in the block page it shows the name of the view and then the name of the block. Well, I realized that my block that wasn't showing, in reality was in the block page but under a different name.

I clone blocks and views all the time and it is good to know why I wasn't been able to see them in the block page. Hope this can be helpful to someone else.

nevets’s picture

Title: Solved!! » Solved!! - Cloned View block does not show on Blocks page
knalstaaf’s picture

Title: Solved!! - Cloned View block does not show on Blocks page » Cloned View block does not show on Blocks page

I'm not totally sure if your post concerns the same issue, vramirez1. It sounds related, but I think the issue dealed with in this topic is a little more technical.

xbrianx’s picture

I am also having this issue, the original view and block_1 are showing up for me in the blocks section, however block_2 is not showing up despite having its own block name.

xbrianx’s picture

I decided to just clone the 3rd block to see what happens and the cloned version block(4) showed up.. its rather strange.. (definitely not cache related either, i had previously refreshed the cache like 10 times and nothing showed up)

dela.deyoungster’s picture

Issue summary: View changes
Issue tags: +views, +block

I'm not sure if others are still having this problem, but I just did. And after playing around a bit, it seems to have some linkage to modifying the View block's Machine name (under the Advanced tab). Such that, if I clone a block and simply save without making any changes, it shows up in the Admin Block screen. Immediately I edit the machine name and save changes, *poof*...it's gone!

And note that reverting the machine name to the initially created default doesn't resolve the issue. Your only recourse seems to be cloning the block again in order for it to show under Admin > Blocks.

hockey2112’s picture

#16 fixed my issue. The "region" value for that block in the "block" database table was empty/blank. I changed it to "-1", and the block now appears on the Blocks admin page and can be added to a region.

matt.rad’s picture

#22 sorted this out for me.

sphism’s picture

Still a problem, #22 sorted this out for me too, cloned the block, didn't change the machine name and now it appears as expected

Michael-IDA’s picture

Version: 7.x-3.3 » 7.x-3.x-dev
Component: block displays » Code
Priority: Major » Normal
Status: Closed (works as designed) » Active

Gotta love 6 year old, unresolved bugs…

To reproduce

Export from Site A, View: “Slider”
Copy/Paste
Import into Site B
(clear cache as many times as you want)

View: “Slider” exists on site B under Views (and works correctly per preview).
View: “Slider” does not exist on site B under Blocks.

To quickly bandaid

Clone View: “Slider” on site B, new name View: “Clone of Slider”
Delete View: “Slider” on site B
Rename View: “Clone of Slider” to View: “Slider”

View: “Slider” now exists on site B under Blocks

Environment

Drupal: 7.54
Install profile: Commerce Kickstart (commerce_kickstart-7.x-2.44)

View: “Slider”
Display: Block
In database
Type: Content

# # #

Changed Issue data to reflect this is not a block display issue, it is an issue specifically with Views Import not correctly functioning and it is still active.

Michael-IDA’s picture

My way above works, but changes the machine name, which if you have specialty CSS coded against it, it breaks your site’s look and feel.

See #16 above for full text for a more dangerous, but more effective solution. Summarizing:

Table: block
"Stores block settings, such as region and visibility..."

Sort on column ‘module’ for ‘views’
find the column ‘delta’ containing your block, mine above is ‘slider-block’
verify column ‘region’ is empty
edit ‘region’ to be ‘-1’

Richard15’s picture

#12 solved fast the problem without access the db