2SXC Blog App - Post Detail Page - No demo item exists for the selected template - blogs

When clicking a blog post to bring up the post's details page, the detail does not load. Instead there is an error that reads "No demo item exists for the selected template."
Not sure what I'm missing.
Platform:
DNN v9.2.2,
2sxc App v9.32.1,
2sxc App Blog v03.00.02
This is my first install of 2sxc, love it thus far, thanks!
I added the blog app. The 3 (or four) example blog posts were there and things seemed to be working correctly. I edited the author to be one of our authors. I deleted all the blog posts except the latest one. The latest one I edited to a new actual post for the site.
When I click on the blog post to bring up it's full details, I get the "No demo item exists for the selected template." error message. I also tried a new blog post, and the new post suffers from the same issue.
I'm not sure what I'm missing. Any help you can provide would be greatly appreciated!

Since you "cleaned up" a bit, my guess is you probably deleted the demo-entry which is configured as a default for a view. This isn't a necessary entry, but usually helpful during development.
I suggest you go to app-administration (ellipsis button till you see a 1-gear-icon, click on that gear). Then go to views. Edit the view "Post Details" and either set the Content-Demo-Item to the one you still have, and you should be good to go :)

Related

What do content addresses look like in Umbraco?

I was trying to access content through previews. At first, this was fine with both Preview and non-preview views, but I moved some of my code to another branch and noticed issues. I remembered seeing http://localhost:63761/1120 work, but now: I'm not sure if this is the correct form of address for content under 1120 to appear. Is there something I need to check?
Postfixing your url with an id is a quick way to look up the content of a node:
For example the following url works in my environment, but is not user or search engine friendly https://localhost:44392/1141
When I look up the node in my umbraco backend: https://localhost:44392/umbraco#/content/content/edit/1141
Navigate to the Properties tab and look for "Link to document", that's the user friendly url for the node
If I understand your question properly, the urls should be like below
Non-preview mode url -
http://localhost:63761/umbraco#/content/content/edit/1120
Preview mode url -
http://localhost:63761/umbraco/preview/?id=1120#?id=1120
Thanks

How can I add a new category to a morea site?

I'm trying to add a new 'project' category to a morea based site, where there will be a page similar to experiences page where I'll collect all course project related experiences and assignments, and maybe even modules.
Is it ok to look for pages with 'project' in their id or maybe better to tag with a new morea tag?
Do I need to also create a new entity type called 'project' or just reuse existing entities
In MoreaGeneraor.rb I couldn't find where module level page collections are prepared, like for example module_page.data['morea_experiences'].
I thought of preparing a similar collection of 'morea_project' pages and then traversing it in the new project page.
Is that done outside of this .rb file? by Jekyll? so how do I inject my collection.
Any simpler idea?...
Thank
p.s. I've also added the following (from line 3) to 'processMoreaFile()', but it does not seem to be visible at later stages:
elsif new_page.data['morea_type'] == "assessment"
site.config['morea_assessment_pages'] << new_page
if new_page.data['morea_id'].include?('project')
site.config['morea_project_pages'] << new_page
puts "--- project page #{new_page.data['morea_id']}\n "
end
but still do not know where to let each module page find out about it's 'project' pages
This is a cool idea. The simplest approach is to avoid making changes to MoreaGenerator.rb, and instead do it using normal Jekyll mechanisms. Here's a sketch:
Add a morea_label called "Project" to each associated module, reading, experience, and assessment.
In master/src, create a new directory called project, containing a file called index.md. This adds a new top-level page to your site (i.e. http://example.com/ics101/project/index.html)
Implement the index.md file with liquid tags to create the desired page layout for your project page. For inspiration, see the index.md files in the other top-level pages (readings, experiences, etc.). You can access YAML content in Liquid.
Once you've got your rocking project page done, you'll want a link to it in the navbar. See add a menu item for instructions.
Good luck! If you get it working to your satisfaction, please post its link as a followup to this question so we can see how it turned out!

WordPress Paradox - Normal posts not being queried

I am in a situation that i can't figure out. I am running a WP 3.4.2 on a site with multiple custom post types. The normal posts are displayed in the blog section and are in a category called blog with different subcategories.
Blog posts and another post type called 'events' display tags in single view. The tags display fine but when you click on a blog post tag no posts are found. Tags related to events work as expected.
The really weird thing is in admin. when I search a tag that is related to a normal post, it finds it and counts how many posts it has, but when clicking on the number of posts is says "No posts found.". With the tags related to events this never happens.
Also, categories have the same problem.. display just posts from events..
Also I tried to make another post type called "blogposts" to display on the blog page instead of normal posts but same sad story.
As far as I see in the code, in archive.php and tag.php, normal posts are not returned from the query, just events get through.
I have this in functions.php
function namespace_add_custom_types( $query ) {
if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {
$query->set( 'post_type', array('post', 'events', 'blogposts' ));
return $query;
}
}
add_filter( 'pre_get_posts', 'namespace_add_custom_types' );
Any ideas would be really welcomed.
Thanks!
This is a weird problem. Most likely caused by a combination of plugin(s) and/or theme.
So first we need to figure out where the problem comes from. So:
turn off all plugins to see if it changes.
Or do it one by one
turn off parts in functions.php in your theme.
turn as many off as possible and see if things change
To find this problem we need more specific information.
Is it your won theme or someone else's?
What plugins are active?
Is this problem new, or did it just 'popup'?
good luck and let me know what you find ;)

How to display blog post in wordpress?

I have a wordpress theme "Hatch", and I'm doing it for my photography. I usually do websites with HTML/CSS (in Dreamweaver), and this is the first time doing Wordpress.
In My homepage, you can see the recent posts as thumbnails. I'm thinking of creating a new menu, called 'Blog', basically just like what normal themes do, displaying blog posts. It might be something simple, but i just can't find what to code to make the posts display as normal display .
the website is lizettephotography.com
thanks heaps!
Liz
No need to code.
Create new category "Blog". Add that category to your main menu.
After that add new post to Blog category. on click blog menu link will show all post having blog category.
You need to format post design as you want.
EDIT :
In order to activate “post formats” in WordPress 3.1+, you will need to open your theme’s functions.php file and paste the following code:
add_theme_support( 'post-formats', array( 'aside', 'gallery' ) );
Note: aside, and gallery are not the only available post formats. The available list of post formats are:
aside – Typically styled blog format.
chat – A chat transcript.
gallery – A gallery of images.
link – A link to another site.
image – A single image.
quote – A quotation.
status – A short status update, usually limited to 140 characters. Similar to a Twitter status update.
video – A single video.
For the full list of post formats, refer to WordPress Codex.
Once you have added this code, you will see a new field in your post write panel in the right hand column where you see publish.
Upon writing the post, you can change the format and hit publish. This will allow you to display your post in a pre-styled format.
Edit your post loop.
Suppose in your case blog category post format is asid
We are going to be utilizing the conditional tag: has_post_format()
if ( has_post_format( 'aside' ) {
// Blog Category format
}
else
{
// Normal Formate
}
I hope this will help you. More Info...

MediaWiki: page editing allowed by creator only or with approval

I'm trying to restraint editing on the Wiki (using MediaWiki) that I'm creating as an internal project for my company.
We would like to be able to let the page creators specify none or one of the two following options:
Nobody besides the creator of this page can edit the content of this page
Anybody can edit the content of this page, but there must be an approval by the page creator before the changes are visible (whether it'd be by mail, on the wiki directly or something else - does not matter).
If the creator does not specify any of the 2 options, anybody can edit the page, and the changes are immediatly visible (default behaviour).
I've been browsing the net but I did not find an out-of-the-box solution for this. We managed to make some great custom stuff thanks to the edition of the LocalSettings file but not this.
Is there a solution for that functionality?
I don't know of an extension that would make this easy.
What I think you could do would be to take an extension like Flagged Revs or Approved Revs and make it so that instead of using groups as the determiner of approval status, it uses username. This might not be too difficult. Does this make sense?
I had the same problem as you and now i fixed it, here is the solution:
I am using http://www.mediawiki.org/wiki/Extension%3aApproved_Revs for article protection but it didn't fulfil my need it allowed the user to change the currently approved revision of the article and so the change was immediately reflected on the main page so I hacked it a bit, basically you need only one change
go to ApprovedRevs/ApprovedRevs.hooks.php
and find the following code:
static public function setLatestAsApproved( &$article , &$user, $text,
$summary, $flags, $unused1, $unused2, &$flags, $revision,
&$status, $baseRevId ) {
this is a function declaration just after it add the following code:
return false;
and it will work the way you wanted it to be i.e (the change you did will not be reflected until you approve it)