Exposed views filter block refuses to show up on a page - drupal

I'm trying to make a facebook app version of an existing page and am having a major issue: my exposed filter block isn't showing up.
I'm using themekey to switch to a facebook version of my theme for the url the facebook version of the page is on. When my page is displayed in my normal theme it works fine, the filter is there, all is good. In my special theme there is nothing. Thing is...the special theme is a straight copy of the normal theme (with the .info modified and all the template functions removed). The block is in the preface middle region, and
<?php
print $preface_middle;
?>
is still in the page template for that page.
On my dev site I tried to simplify matters by making the facebook theme the site wide theme (thinking that themekey was throwing things off somehow) and I had the same issue. Eventually I fixed it (somehow) on my dev site, but when I tried to use those same fixes on the live site they didn't work.
What can prevent a block with exposed filters from displaying when it should be? Like I said, when I turn off themekey the filters are there, Drupal clearly knows that the filters should be displayed at that url. I'm going nuts...what can I do?

When you go to blocks section of your site: you need to add the block to the preface_middle section in the theme you want.
so:
Make sure the "facebook" theme is active
Go to blocks section and click on the "fascebook theme"
Move the block to the section you want for this theme.

Related

WooCommerce pages showing as blank

The cart, my-account and checkout pages are all blank when I try view them. All I get is the header and footer. All I have done so far is download WooCommerce, go through the settings and add theme support. My shop page wasn't working until I added theme support but now thats the only page that does. Also I've noticed that if I use WooCommerce shortcode in my php files I can get the pages. But the shortcode doesn't seem to be working in the backend. BTW I'm using my own custom theme incase thats relevant.
What can I do to fix this?
update:
This must be an issue with my theme as if I set one of the default ones to active all the WooCommerce pages show. But I don't know what my themes issue is yet.
update: I have noticed that the WooCommerce pages are allowing me to add templates to them, apart from the shop page which is working. Why is this happening?
There are few steps to do.
First turn on debug, by switching WP_DEBUG to true.
View source of page, and check if everything is being rendered, and also check console for JS error.
At last, for theme, if after switching to default theme, content shows up, there is a theme related issue.
Check for missing templates or template parts or structure within related with page from which content is missing and compare it with default themes templates and template parts.
See if there is some template part missing, or modified, like content.php or content-page.php, the_content() , etc.

How to have single-slug behave like a normal page in WordPress?

I'm making a website in WordPress, and I'm using a plugin ACF PRO. I'm doing the entire site with flexible content, so the WordPress site is like a page builder.
Everything is fine, however, I came to a point where I need to have same functionality for single-[custom-post-type], so I can "Add row", header, footer etc... on it, but I can't figure out on how to do it.
I know that it's possible, because e.g if you look at this site here: https://rolleragency.co.uk/our-projects/
You can see that it works. I know they are using flexible content because I worked on that site and I did there what I wanted. I can't remember how to do that.
I think I had to use a Tempate Page? Or? I can't remember.
THe site is built entirely on flexible content, so everything there is modular and it's like a drag and drop, but how do I do that on single-slug?
You have to create a page template, yes.
So something like page-projects.php then in WordPress admin you would have a page called Projects.
The template you created should be automatically applied to this page. If it doesn't for some reason you can choose which template WP should use on the right side when editing a page.
Now, you can add whatever code you need to the page-projects.php. And also any fields you may need for that page you can set up in ACF by telling ACF to apply those fields to pages that use projects template.
This is how I would and did do it on several occasions :)

Drupal ecommerce theme no correctly viewed

Im quite new to drupal, At the moment ive been trying to install a commerce theme but i dont get the correct appearance of it
the original theme
how it looks in my localhost
i have alreay installed drupal commerce, panels, ctoold, views etc... can sosmebody tell me what has gone wrong and how do i get the original look of the theme
There is a lot of things you need to do after installing the theme.
After installing new theme you should do the following:
Change default logo to your site logo.
Check what menu items are displayed and manage them in your structure>>menus
Add slider images by checking where to add the images (Read your theme readme.txt)
Add content so as to display in appropriate areas.
Add Products to your site.
Configure home page link.
Configure your categories / popular categories tags blocks.
Configure special offers block. May be you need to create a view with block display.
Place search block in appropriate region.
I am listing few and you can figure out rest if anything is not at its position.
Note: Generally the theme provides you basic regions, templates, css and icons structure, and you have to manage your site content so as to get the look and feel.

Drupal 7 Views - Node Content Not Appearing

I have an issue in Drupal with getting node content to display itself. I suspect it could have to with the CSS styling, although I'm not 100% sure what's causing the issue.
Background:
So basically I'm trying to setup a blog but I'm running into serious issues trying to simply get the blog posts to display themselves.
I created a custom Drupal 7 theme using the export function of Artisteer (http://www.artisteer.com/?p=overview). A stylesheet called style.css was generated. I put some of my own CSS into this stylesheet along with the parts that were auto-generated. I should mention I did some amount of custom CSS to force the homepage to look the way I wanted.
I followed the instructions from the PDF at (http://learnbythedrop.com/buildingyourblog) to create a blog (great easy-to-follow guide). The most relevant pages for Views are pages 34 - 36, where he takes you through how to create a "Blog Post" view, in order to display your blog content correctly. However, when I got to the point where he created sample blog content and it displayed it's title and main content, this simply didn't work for me. See this link for example (Sample content that I created for testing purposes):
(http://www.productworld.com/blog-posts/2012/06/08/hello)
I can see a list of titles for sample content that I created (under the Recent Posts block), but I can't view any content from the individual blog posts themselves. The page is just blank.
Also, I can't see a list of the titles and teaser links - it should show up under (http://www.productworld.com/blog-posts) but that URL gives me a "page not found" error. This was something that worked in a previous iteration but now does not work.
Here are 2 screenshots of my View settings, in case it's relevant:
http://i.imgur.com/uadew.png
http://i.imgur.com/9yOUk.png
Questions:
What is the likely cause of the blog content not displaying? (If I do a preview of the blog post within the Views section I can see the blog content just fine, it just won't display on the actual page.) Is it styling? Some setting in Views? Some Block setting? I've searched my style.css file and tried commenting out everything to do with "content:hidden" and "display:none" to no avail. I've tried every combination of settings in the blog posts View to no avail. I've tried placing "Main Page Content" and "View: Blog Posts" blocks in various regions, and changing around the settings that restrict where the block can be displayed. The blog post title/body content doesn't show up in the page source at all, which could be a clue. How would I go about debugging such a problem?
Why is www.productworld.com/blog-posts saying "page not found", even though I've specifically set up a view to create a page at this URL? And why does www.productworld.com/blog-posts/2012/06/14/hello-world-3 show up as a valid page, when it contains "blog-posts" in it's URL?
Any help would be greatly appreciated. If I should display stuff to do with my stylesheet please let me know.
To me it looks as if you have panels overriding the Node template. Which is why your node is not being displayed properly.
Go to Structure > Panels and see if the Node Template option under Manage pages is enabled. If it is, that's probably your issue. You can tell if it's enabled by looking to the right of the text to see whether it says enable or edit.
You can then edit that setting and then edit the content and choose Node > Body to get the body of the blog post to show correctly.
Take a look at this intro video to panels if you aren't familiar with it. http://yadadrop.com/drupal-video/panels-3-overview
Take the leading '/' character out of your page path for the view - internal Drupal paths should generally never have that, but the system will prepend the configured base path to paths on your behalf (and it is probably already a '/').

Drupal Block display not showing on a module page

I have successfully created content types for certain pages which I have in Drupal. I have also successfully created menus for those content types, so when a user is on a certain type, for instance, Blog Article, they are presented with a certain menu. The problem is when I few all the blog articles the menu is there, but when when I few the /blog page which shows all the blog entries, the content block is gone.
I've set it up so the block will only be shown with certain content types, but there doesn't seem to be a content type of blog module in general. Is there a way around this? It is the same for the forum page. It will show for forum topics, but not for the actual forum.
I hope I've made my self clear, as it is quite hard to explain.
I do not know what version of Drupal you are using but I will try to help.
As per docs on drupal.org:
Configuring a block
Go to the Blocks overview page (Administration > Site Building > Blocks) to configure the blocks on your site. This page allows you to
drag-and-drop blocks into different regions as well as reorder the
blocks within a region.
Next to each block you can click "Configure" to change the specific block settings: Block title: Allows you to override the default title
for the block User, Role, and Page specific visibility: Adjust
visibility for block based on user, role or page. Additional settings
may also be available, depending on the particular block.
Note that blocks are configured per theme. If you change the theme or
enable multiple themes, you will need to configure blocks per theme.
Yeah. I may of messed the formatting a bit but basically, in step 2, you want to configure your block visibility by page specific visibility. It looks something like below:
Basically, I think in your case you could use that to show the blocks containing your menus on specific pages and add whatever paths you want your menu to show on.
Hope that helps! Happy coding
I figured it out. Instead of trying to display a block based on the content type you have to change it so it is displayed based on the URL. The reason for this is because the blog module which comes with Drupal 7 doesn't have a content type, so when a user arrives at http://www.example.com/blog there is no content type and throws all the blocks restricted by content type out the window.
To get around it I had to install a plugin called Pathauto. This plugin allows you to specify a default URL for a content type. Be sure to install this plugin first before creating any content as any previous URLs will not work, so you will have to manually go back and change the URL alias.
Once you have installed the Pathauto plugin go and setup your paths for content types. I set it up so anything which is a derivative of the content type "Blog Entry" is given the URL /blog/post-name
Now all you have to do to set the block is go to the block and click configure. In the section Pages make sure you select "Only the listed pages". You'll have to type two lines. blog and blog/*
Now that you have set this any new content which is created as Blog Entry will fall under this URL expression and the block will be shown.
Works like a dream now. What a headache to get working.

Resources