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.
Comment | File | Size | Author |
---|---|---|---|
#7 | clone-issue.txt | 21.86 KB | knalstaaf |
Comments
Comment #1
dawehnerThis sounds a bit like #1151032: Notice: Undefined offset: 1 in views_block_view() (line 618 of views.module)
Comment #2
dawehnerAre you sure you saved the cloned view and cleared the cache?
There is no big technical difference beside adding and cloning a view.
Sure the machine name of the display shouldn't change, but the one from view itself.
Comment #3
joe casey CreditAttribution: joe casey commentedI 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.
Comment #4
esmerel CreditAttribution: esmerel commentedIs this still a problem with the most recent release?
Comment #5
dawehnerWell 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.
Comment #7
knalstaaf CreditAttribution: knalstaaf commentedReporting 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
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedDitto. 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.
Comment #9
cpelham CreditAttribution: cpelham commentedI am also having this issue.
Comment #10
dawehnerI 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.
Comment #11
cpelham CreditAttribution: cpelham commentedI made a second clone and it appeared but the first clone still has not. At least I was able to overcome the problem though.
Comment #12
praimmugen CreditAttribution: praimmugen commentedHi, 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).
Comment #13
sjugge CreditAttribution: sjugge commentedI encountered this issue as well with the following specs:
bug reproducible
* 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
* 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
* Views 7.x-3.5
* Chaos Tools 7.x-1.2
* Flag 7.x-2.0
* Admin Menu 7.x-3.0-rc3
* 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.
Comment #14
alphex CreditAttribution: alphex commentedsubscribe.
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
Comment #15
alphex CreditAttribution: alphex commentedCloning the view recreated the blocks.
Comment #16
TajinderSingh CreditAttribution: TajinderSingh commentedWhen 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.
Comment #17
vramiguez CreditAttribution: vramiguez commentedIt 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.
Comment #18
nevets CreditAttribution: nevets commentedComment #19
knalstaaf CreditAttribution: knalstaaf commentedI'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.
Comment #20
xbrianx CreditAttribution: xbrianx commentedI 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.
Comment #21
xbrianx CreditAttribution: xbrianx commentedI 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)
Comment #22
dela.deyoungster CreditAttribution: dela.deyoungster commentedI'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.
Comment #23
hockey2112 CreditAttribution: hockey2112 commented#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.
Comment #24
matt.rad CreditAttribution: matt.rad commented#22 sorted this out for me.
Comment #25
sphism CreditAttribution: sphism commentedStill a problem, #22 sorted this out for me too, cloned the block, didn't change the machine name and now it appears as expected
Comment #26
Michael-IDA CreditAttribution: Michael-IDA commentedGotta love 6 year old, unresolved bugs…
To reproduce
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
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.
Comment #27
Michael-IDA CreditAttribution: Michael-IDA commentedMy 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’
Comment #28
Richard15 CreditAttribution: Richard15 commented#12 solved fast the problem without access the db