Content not showing up
Closed this issue · 36 comments
After a fresh install new content is not showing up.
Created new content as "Block Content" this does not appear on the public site. Yes it is published.
Edited existing "Articles" and they are converted to "Block Content" and disappear.
I don't see this. I did notice that every time you install it inserts the About-Me, Welcome and Sample Article. This part I can fix easily (never noticed it until I was trying to track this one down.)
Another thing I noticed was that one of the merges made the taxonomy an required field which means that sometimes you can't actually update content, because it's unable to focus on a required field on a secondary tab. This should be fixed independently, but taxonomy has a default of '' and should not be required.
Block content will only show up if that block is being used in the template but articles should show up fine. Can you send me reproducible steps for the Article to block conversion?
I fixed the duplication of the sample data during installation.
Have you tried the aloha editor to edit the blocks?
I have the aloha editor module enabled but I only get a textbox to edit content. This is another issue.
I did a fresh install of everything.
I created some content I only had Block Content to choose from.
I made sure it was published
It does not show up on the site
Looking inside mongo I see that is_public is set to false. Is this important?
Ah ok. We might have found another problem. If the content type does not
get installed properly then it would fail. Aloha shows up as a yellow
outline over the block in the actual ui and not inside of the content
editor ui. I will check on the content type. I wish I didn't need to
upgrade mongoose willy nilly but the calip.so site was down since nodejitsu
no longer supports mongodb 0.9.x and to get mongodb 1.3.x I had to upgrade
mongoose. I belive all this is fallout thereof.
Sorry, I'll stay on top of it.
Andy
Sent from my iPhone
On Sep 10, 2013, at 8:05 AM, steveww notifications@github.com wrote:
I have the aloha editor module enabled but I only get a textbox to edit
content. This is another issue.
I did a fresh install of everything.
I created some content I only had Block Content to choose from.
I made sure it was published
It does not show up on the site
Looking inside mongo I see that is_public is set to false. Is this
important?
—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/216#issuecomment-24154442
.
Fixed. There was a typo in the content installer, causing content-type and other modules to not install correctly.
This is probably why you didn't get access to all the content-types.
Just reinstalled everything and it's still the same.
Only Block Content and new content does not show up.
Can you paste the output of "node app" or the way you install it? I tried it multiple times and it seems to work for me.
Do you have steps to reproduce?
Andy
On Sep 10, 2013, at 10:34 AM, steveww notifications@github.com wrote:
Just reinstalled everything and it's still the same.
Only Block Content and new content does not show up.—
Reply to this email directly or view it on GitHub.
Installed as per the instructions on your site:
npm install calipso -g
calipso site /path/to/a/dir
calipso server
Running on Ubuntu 12.04 LTS with Mongo 2.0.4
See the log at http://www.steveww.org/drop/calipso.log.gz
Hmm, ok you're using 0.10.18 and I am using 0.10.15 (checking)
Also, could you send the output of "calipso server" and then execute the installation steps (removing conf/development.json before executing calipso server.)
The reason is that the installation of the previous install would set "installed" = true although it didn't properly populate contentTypes and other modules thereafter.
Thanks
Andy
On Sep 10, 2013, at 11:04 AM, steveww notifications@github.com wrote:
Installed as per the instructions on your site:
npm install calipso -g
calipso site /path/to/a/dir
calipso serverRunning on Ubuntu 12.04 LTS with Mongo 2.0.4
See the log at http://www.steveww.org/drop/calipso.log.gz—
Reply to this email directly or view it on GitHub.
Actually what is "node 0.10.18"? I don't see it published yet. I usually use "nvm" to make sure I have production versions.
Andy
On Sep 10, 2013, at 11:16 AM, Andreas Richter andy@richteralsi.com wrote:
Hmm, ok you're using 0.10.18 and I am using 0.10.15 (checking)
Also, could you send the output of "calipso server" and then execute the installation steps (removing conf/development.json before executing calipso server.)
The reason is that the installation of the previous install would set "installed" = true although it didn't properly populate contentTypes and other modules thereafter.
Thanks
AndyOn Sep 10, 2013, at 11:04 AM, steveww notifications@github.com wrote:
Installed as per the instructions on your site:
npm install calipso -g
calipso site /path/to/a/dir
calipso serverRunning on Ubuntu 12.04 LTS with Mongo 2.0.4
See the log at http://www.steveww.org/drop/calipso.log.gz—
Reply to this email directly or view it on GitHub.
End of calipso site ... command
Application created at: /home/stevew/temp/node
Installing any difficult application dependencies via NPM, please wait ...
Installing mongodb in native mode ...
npm WARN package.json connect-form@0.2.1 No repository field.
npm WARN package.json ejs@0.6.1 No repository field.
npm http GET https://registry.npmjs.org/mongodb
npm http 304 https://registry.npmjs.org/mongodb
npm http GET https://registry.npmjs.org/kerberos/0.0.3
npm http GET https://registry.npmjs.org/bson/0.2.2
npm http 304 https://registry.npmjs.org/kerberos/0.0.3
npm http 304 https://registry.npmjs.org/bson/0.2.2
Does it sizzle? :)
Thanks
Andy
On Sep 10, 2013, at 11:19 AM, steveww notifications@github.com wrote:
Just got it hot off node.org
—
Reply to this email directly or view it on GitHub.
Output of calipso server
Calipso version: 0.3.40
Calipso configured for: development environment.
Calipso server listening on port: 3000
Installation Password: "x0XgTEJjDySEI0oyPzaveOumuYHndA0yXQ==" (inside quotes)
10 Sep 16:25:10 - info: Saving configuration ...
10 Sep 16:25:10 - info: Reloading updated configuration ...
10 Sep 16:25:10 - info: Installing module content
10 Sep 16:25:10 - info: Installing module contentTypes
10 Sep 16:25:10 - info: Installing module permissions
10 Sep 16:25:10 - info: Installing module user
10 Sep 16:25:11 - info: User module installed ...
10 Sep 16:25:11 - info: Content types module installed ...
10 Sep 16:25:11 - info: Content module installed ...
10 Sep 16:25:11 - info: User Roles sub-module installed ...
This looks good. Do you see any errors when you're trying to add or update content which might give us a clue?
I am not quite sure what is and isn't working in your scenario.
Thanks
Andy
On Sep 10, 2013, at 11:26 AM, steveww notifications@github.com wrote:
Output of calipso server
Calipso version: 0.3.40
Calipso configured for: development environment.
Calipso server listening on port: 3000
Installation Password: "x0XgTEJjDySEI0oyPzaveOumuYHndA0yXQ==" (inside quotes)
10 Sep 16:25:10 - info: Saving configuration ...
10 Sep 16:25:10 - info: Reloading updated configuration ...
10 Sep 16:25:10 - info: Installing module content
10 Sep 16:25:10 - info: Installing module contentTypes
10 Sep 16:25:10 - info: Installing module permissions
10 Sep 16:25:10 - info: Installing module user
10 Sep 16:25:11 - info: User module installed ...
10 Sep 16:25:11 - info: Content types module installed ...
10 Sep 16:25:11 - info: Content module installed ...
10 Sep 16:25:11 - info: User Roles sub-module installed ...—
Reply to this email directly or view it on GitHub.
No errors. I just can get to the new content after I create it.
Just a moment I will attach a view of the data......
I will try the install on one of my EC2 instances. Then you should be able to see what is happening.
Ok trying to go through your steps.
Andy
On Sep 10, 2013, at 11:33 AM, steveww notifications@github.com wrote:
Here it is.
—
Reply to this email directly or view it on GitHub.
Somehow the contentTypes were still not installing correctly. I moved some of the code around and now it works.
Might have been a timing issue or something that didn't jump out at me. Seems to work now.
Thanks
Andy
On Sep 10, 2013, at 11:36 AM, Andreas Richter andy@richteralsi.com wrote:
Ok trying to go through your steps.
AndyOn Sep 10, 2013, at 11:33 AM, steveww notifications@github.com wrote:
Here it is.
—
Reply to this email directly or view it on GitHub.
Cool I can now create an Article and it shows up :-)
Block content still does not show up. What is Block for?
Blocks are used from within templates. For example the about and welcome blocks show up on the home page.
Thanks
Andy
On Sep 10, 2013, at 12:11 PM, steveww notifications@github.com wrote:
Cool I can now create an Article and it shows up :-)
Block content still does not show up. What is Block for?—
Reply to this email directly or view it on GitHub.
Please can you point me in the right direction as to how these are called in to the template?
Did you look at http://calip.so for the documentation? It's not as complete as I'd like but might get you started.
For example this is how content is output:
<% contents.forEach(function(item) { %>
<div class='content-list-item content-list-item-<%- item.status %> content-type-<%- item.contentType %>'>
<h2><a href='/<%= item.alias %>.html'><%- item.title %></a></h2>
<p><%- item.teaser %> ... <a href='/<%= item.alias %>.html'>more</a></p>
</div>
<% }); %>
<%- pager %>
This is how a block might be pulled in:
<div class = "home-content">
<div class = "home-welcome">
<%- welcome %>
</div>
</div>
/**
* Additional content section / block functions for body.
*/
var rootpath = process.cwd() + '/',
path = require('path'),
calipso = require(path.join(rootpath, 'lib/calipso'));
exports = module.exports = function (req, options, callback)
{
/**
* Get additional content for blocks in the template
*/
calipso.lib.step(
function getContent()
{
options.getContent(req, "welcome", this.parallel());
}, function done(err, welcome, homepageText)
{
callback(err, {
welcome: welcome,
homepageText: homepageText
});
});
};
OK I have figured out how options.getContent(...) works.
I have read the limited documentation on the WIKI on Github.
Not sure what options.getBlock(/regex/, this.parallel()) does???????
It accumulates all the blocks matching the regex.
For example...
/**
* Additional content section / block functions for body.
*/
var rootpath = process.cwd() + '/',
path = require('path'),
calipso = require(path.join(rootpath, 'lib/calipso'));
exports = module.exports = function (req, options, callback)
{
/**
* Get additional content for blocks in the template
*/
calipso.lib.step(
function getContent()
{
options.getBlock(/^content.*/, this.parallel());
options.getBlock(/^admin.*/, this.parallel());
options.getBlock('scripts.disqus', this.parallel());
},
function done(err, content, admin, disqus)
{
callback(err, {content: content, admin: admin, disqus: disqus});
}
);
};
The first options.getBlock() accumulates all content blocks which are then passed as the first parameter (after the error) to the done() function. Therefore the callback will be invoked with {content: array of all content blocks, ...}
The route needs to populate those blocks and then the js associated to the template can pull them out and return them to the renderer.
Hmm.....
Digging through the source it looks like getBlock pulls in modules and getContent pulls in "Block Content" whose alias matches the name.
Looking at some of the modules it appears that presentation formatting is included in the modules. Surely there should be total separation of formatting so that it is only handled by the template?
I know this is getting off topic now. May be we should continue elsewhere?
The data is formatted by templates. Either a generic one or a custom one
associated with the content type. Then the theme templates put together the
rendered blocks.
Thanks
Andy
Sent from my iPhone
On Sep 11, 2013, at 7:12 AM, steveww notifications@github.com wrote:
Hmm.....
Digging through the source it looks like getBlock pulls in modules and
getContent pulls in "Block Content" whose alias matches the name.
Looking at some of the modules it appears that presentation formatting is
included in the modules. Surely there should be total separation of
formatting so that it is only handled by the template?
I know this is getting off topic now. May be we should continue elsewhere?
—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/216#issuecomment-24232236
.
Not wishing to get in to a pantomime situation but.......
From the content core module it clearly has formatting elements in it:
<%- content.title %>
<p class='by'>By <a href='/user/profile/<%- content.author %>'><%- content.displayAuthor.name %></a></small>
h2 and small (end tag only) are formatting. IMHO the elelmets would be better as
Not sure what happened there only half my post appeared????
... continued
<%- content.title %>
<p class='by'>By <a href='/user/profile/<%- content.author %>'><%- content.displayAuthor.name %></a></small>
Chrome on Linux not working so well on Github trying with a different set up on my Mac.
... continued
<%- content.title %>
<p class='by'>By <a href='/user/profile/<%- content.author %>'><%- content.displayAuthor.name %></a></small>
and are definitely formatting
OK still did not work on my Mac. Github is blocking my content when it has HTML in it.
There are h2 and small tags in the show.html for example.
Use three backquotes on the line before and after code you put in. You can
add the type after the initial back quotes. Like bq bq bq html or bq bq bq
javascript. It's part if the github md
Andy
Sent from my iPhone
On Sep 11, 2013, at 7:57 AM, steveww notifications@github.com wrote:
Chrome on Linux not working so well on Github trying with a different set
up on my Mac.
... continued
—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/216#issuecomment-24234298
.
That's the template which can be overridden in the theme. If the theme
doesn't have a replacement it will use the one from the model
Andy
Sent from my iPhone
On Sep 11, 2013, at 7:58 AM, steveww notifications@github.com wrote:
OK still did not work on my Mac. Github is blocking my content when it has
HTML in it.
There are h2 and small tags in the show.html for example.
—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/216#issuecomment-24234355
.
OK I see.
How do I work out what I need to put in the template to override the model? What are the rules for substitution?
To answer my own question.
You need to define the overrides in the theme.json file by adding a modules element. Have a look at the calipso theme under the downloaded folder for an example as the documentation is not clear on where to add it.