keystonejs / keystone-demo Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://demo.keystonejs.com
License: MIT License
Home Page: https://demo.keystonejs.com
License: MIT License
Hi,
Is there any way to add user roles and permission feature in admin section?
can you please guide me.
Thanks,
I am working on implementing the postcomment feature, however when I submit a comment i get a 404 error from the post method of the comment form. I have copied over the post.js, the commenting mixins, and the post comment model. What am i missing?
I am totally new to KeystoneJS and I installed the demo to my local instance and it runs fine, of course until I hit areas of the demo that requires the API Keys. So I went and created the keys for Cloudinary, Embedly, and Mandrill. Then I created a .env file. I installed the app and ran it. Now when I login as an admin, I get a 500 error.
Express
500 Must supply api_key
All I did was include the 4 properties that were suggested.
Any thoughts?
Thanks...
I updated 0.0.1-admin.js file to use my own email and password. I restarted the server, but it said "Invalid username or password" when I input mine. Using the demo user name and password worked. How do I update to use my own?
I modified the 0.0.1-admins.js file but I get an error message when I try to sign in. Its sad because I'd really love to work with this great version.
After login this page is blank
http://demo.keystonejs.com/keystone/posts
It works fine on Chrome
p/s: seem others link blank too http://demo.keystonejs.com/keystone/enquiries
@vitalbone replicated the issue, this is a bug and should be fixed. Getting this error:
SyntaxError: Attempted to redefine property 'downloadItems'.
(anonymous function)list.js:5786
list.js:5786
Hello Everybody,
this is a super interesting starting point. Love to see the project grow and contribute as good as possible.
I got a quick starter question and google didn't help yet.
GET /keystone/galleries/54f607729866aaaf0a04dabf 200 1321ms
.write(string, encoding, offset, length) is deprecated. Use write(string[, offset[, length]][, encoding]) instead.
/Users/dannydevelop/www/sandbox/keystone-demo/node_modules/keystone/node_modules/cloudinary/lib/utils.coffee:574
throw "Must supply api_key";
^
Must supply api_key
what API is talked about?
Best, Tilman
I cloned the repo and launched the app on localhost. I created a post and added a comment for the post.
Now when I click on the comment id while on post page, it gives an error
"There's a problem with the network, we're trying to reconnect...".
The following XHR request to the server keeps failing:
GET /keystone/api/posts/573ab3a8da4bb04f3044cfe4?drilldown=true 404 3.952 ms
is throwing
{"err":"not found","id":"573ab3a8da4bb04f3044cfe4"}
I noticed that the id passed is that of the comment, hence 404.
Also please note that on refresh the page loads perfectly fine.
Thanks
Praveen
Hi @JedWatson.
I was using your comments feature that you show in this keystone-demo project and I may spotted a unnecessary variable that you don't use in the whole file.
I want to verify that is correct or not before I submit my pull request
https://github.com/EduardoAC/keystone-demo/blob/master/routes/views/post.js#L2
We should change the logic to accept any email/password so we don't have to keep resetting the credentials.
In the demo model/user.js, how the 'permissions' works?
Hi,
I have setup this dome to my server. Here is url:
http://52.38.37.147:3000/contact
when I submit contact us (enquiry) form I'm getting errror that propery 'name' not found. Here is full error info:
Can anyone help me to fix this issue?
Thanks,
Hi guys,
I'm try to build demo today and sadly found this announement.
Maybe it's time to switch to mailgun instead?
Thanks.
Hello,
I am new to Keystonejs and React, stuck trying to use a React component on the frontend.
Adding the react-date-picker code (included on admin):
import React from 'react';
import DayPicker, { DateUtils } from 'react-day-picker';
import 'react-day-picker/lib/style.css';
...
to the keystone-demo contact form (or any .js/.jsx/as .script on a jade view) results in the error:
(function (exports, require, module, __filename, __dirname) { import React from 'react';
^^^^^^
SyntaxError: Unexpected token import
Adding the component as a dependency in the project's package.json
per http://stackoverflow.com/questions/43087289/how-to-use-an-admin-react-component-on-front-end made no difference
Thanks in advance for any help in figuring this out - great work on keystonejs & the demo app!
I have checked the https://blog.kissmetrics.com/open-graph-meta-tags/ url but it will suggest we are not able to add og:image into cms application. Is it right?
So please suggest how can I able to add og:image dynamically into this CMS application.
Is there a place where one can see how this demo was built? I can follow the Getting Started guide, but there seems to be too much of a gap between what is offered there and this "basic" demo. Any suggestions are appreciated.
P.S. Awesome CMS!
Clicking 'Open keystone' or going to /keystone redirects to keystone/signin.
After creating a post from the Admin UI, visit the blog page and then click the title of the created post. The following error message is shown:
Sorry, an error occurred loading the page (500)
/Users/john/repos/keystone-demo/templates/mixins/commenting.jade:33
31|
32| mixin comment-thread(comments)
> 33| if comments.length
34| for comment in comments
35| +comment-post(comment)
36|
Cannot read property 'length' of undefined
However after changing the code to following gets rid of the error:
if comments && comments.length
But then the menu bar theme disappears from the post description page, this could be a separate bug altogether.
ReferenceError: Unknown keystone list "person"
I can't find ./models/index.js
I’m interested to know how I can choose between templates in the wysiwyg editor, corresponding to different post variations. For instance in the post model from the demo it has a content property with a "brief" and "extended" field. How could I add optional fields to this model?
Relatedly, how could I let the user select between different styles for different type of post layouts, designs etc.?
Cheers
when i run the code below, none of the helpers that are in the template work? How do i load the helpers or is there another way I should be doing this in Keystone?
I posted this issue here since it is a demo of handlebars, but if it should be in main repo, I will move it.
the template
<script id="test-template" type="text/x-handlebars-template">
\{{#each data.jobs.results}}
<!-- Every Post -->
<div class="col-sm-5 jobs-card loop">
<a data-toggle="modal" data-target="#myModal" data-remote="\{{postUrl slug}} #fragment"
href="\{{postUrl slug}}">
<div class="jobs-image">
<img alt="\{{{title}}}" class="img-thumbnail"
src="{{#if image.url}}{{cloudinaryUrl image width=80 height=80 crop='fill' gravity='center' }}{{else}}
/html/assets/tumblr_mufrp1cpsZ1st5lhmo1_1280.jpg{{/if}}"/>
</div>
<div class="jobs-content">
<h3 class="jobs-content-header">\{{{ title}}}</h3>
<p class="jobs-content-copy">\{{{shortDescription}}}</p>
</div>
<div class="jobs-share">
</div>
</a>
</div>
<!-- /.col-sm-6-->
\{{/each}}
</script>
The source code
$("#selectedCategory").change(function (_event) {
var url;
if (_event.target.value) {
url = 'http://localhost:3000/api/postByCategory/' + _event.target.value;
} else {
url = 'http://localhost:3000/api/post';
}
$.ajax({
url: url,
dataType: 'json',
success: function (_response) {
try {
var source = $('#test-template').html();
var template = Handlebars.compile(source);
var context = {
data: {
jobs: {
results: _response.Posts
}
}
};
var html = template(context);
$('#jobCardSection').html(html);
} catch (EE) {
console.log(EE);
}
}
});
});
I notice that dotenv has been removed since 2015.11..
The ones who clone this repo and try to build their own project based on it need to install it by themselves or there is some other module replace the dotenv?
I'm just curious about that and if this issue is not proper plz let me konw and I will close it anyway.
Enforce uniqueness validation on User models. If a new user is attempted to be made with an email that already is in the database it should fail with flash error.
Hi,
I found 2 issues with the new KeystoneJS Demo:
Note: I can use the previous version of demo so the problems are related to the new version.
Thank You
Kosona Chriv
Dear author
I need your help. How can I enable robots.txt inside this demo for searching
Thank you !
Hello,
just wanted to check out the Comments feature. I cloned the repo and run the application with node keystone.js.
I create a post and publish it.
Try to open the Post in order to see comment sections. But here I receive following error:
GET /blog 200 139.637 ms
Error thrown for request: /blog/post/qweqwe
Error: /Users/myuser/development/dr/keystonedemo/templates/views/post.jade:34
32| | ,
33| else
> 34| |
35| if post.author
36| | by #{post.author.name.full}
37| hr
unexpected text |
Upon updating an existing post the publish date doesn't display again - the console logs the following error from this line...
field = undefined, path = "createdAt"
...from the following line...
console.warn('Invalid Column specified:', i);
...within item.js
The error is thrown whilst looking for "createdAt" within the fields array.
var field = _this.fields[path];
This is whilst updating an existing post on this webpage http://demo.keystonejs.com/keystone/posts/
Hi,
I am getting the following error when trying to install on ubuntu.
200 https://github.com/keystonejs/keystone.git
npm http 200 https://registry.npmjs.org/async
npm ERR! not a package /home/ubuntu/tmp/npm-1507-LOv47Z7N/1448914559088-0.12499654735438526/tmp.tgz
npm ERR! Error: ENOENT, open '/home/ubuntu/tmp/npm-1507-LOv47Z7N/1448914559088-0.12499654735438526/package/package.json'
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! [email protected]
It seems to work fine on my local mac but not on my amazon ec2 ubuntu server running 14.04
Please help.
Thanks
Titash
Inside the admin UI, relationships does not mapping url correctly.
Eg. in post table, user column element are mapping to
undefined/users/:id
instead of
/users/:id
Steps to reproduce:
git clone the repo
npm install
create a new post
if you click on the element, will cause #27 issue
npm 3.5.0
keystone-demo 95fe3e6
after signin up, I couldn't access to the Admin UI, neither add posts, redirected to signin
At the moment, the isAdmin flag can be edited, which lets people disable the demo account. Not good.
The Error Handling panel on the index page can't find the stylesheet to rendering the correct styling.
I love this framework and it is very easy to use as a startup. I see the access control of keystone is quite simple at the moment: admin or reader. Is there a way to make the access control more complicated. e.g. a role based ACL or privilege levels for read/write/deletion for each content field. Thanks.
Hello,
You can inject Javascript
in your post comments, take a look in here - http://demo.keystonejs.com/blog/post/another-post#comment-id-5716127eb541d30300b33620
I think you need to fix this ASAP,
Cheers.
[email protected]/demo was changed
Default date in gallery upload section in admin ui is in format:
27th Jan 2016
Causing a flash error message:
There was a problem saving your changes:
Please enter a valid date in the Published Date field
needs to be in format
2016-01-27
will install it if it's not possible, thanks
edit nvm I can't read :)
Sign in with the username [email protected]
and the password demo
On my ubuntu 16.04
npm start shows this error, I cant start the project. Here is the npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/home/negus/Desktop/lultech/y/node_modules/.bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
10 verbose lifecycle [email protected]~start: CWD: /home/negus/Desktop/lultech/y
11 silly lifecycle [email protected]~start: Args: [ '-c', 'none' ]
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `none`
13 verbose stack spawn ENOENT
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:17:16)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at ChildProcess.emit (events.js:191:7)
13 verbose stack at maybeClose (internal/child_process.js:850:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/negus/Desktop/lultech/y
16 error Linux 4.4.0-22-generic
17 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
18 error node v6.0.0
19 error npm v3.8.6
20 error file sh
21 error code ELIFECYCLE
22 error errno ENOENT
23 error syscall spawn
24 error [email protected] start: `none`
24 error spawn ENOENT
25 error Failed at the [email protected] start script 'none'.
25 error Make sure you have the latest version of node.js and npm installed.
25 error If you do, this is most likely a problem with the lultechsite package,
25 error not with npm itself.
25 error Tell the author that this fails on your system:
25 error none
25 error You can get information on how to open an issue for this project with:
25 error npm bugs lultechsite
25 error Or if that isn't available, you can get their info via:
25 error npm owner ls lultechsite
25 error There is likely additional logging output above.
26 verbose exit [ 1, true ]
Credentials for Admin UI are not working
Steps to reproduce:
Thank you in advance
Hi,
I have setup this demo and I have tried to use Types.File. But when I tried to start keystone I'm getting this error:
/home/ubuntu/kslms/lms/node_modules/keystone/lib/storage/adapters/fs/index.js:36 throw e; ^ TypeError: Object #<Object> has no method 'accessSync' at ensurePath (/home/ubuntu/kslms/lms/node_modules/keystone/lib/storage/adapters/fs/index.js:24:6)
Here is my code:
var MediaStorage = new keystone.Storage({ adapter: keystone.Storage.Adapters.FS, fs: { path: keystone.expandPath('./uploads'), publicPath: '/public/uploads', }, }); SectionLession.add({ title: { type: String, required: true }, section: { type: Types.Relationship, initial: true, ref: 'CourseSection', index: true }, banner: { type: Types.CloudinaryImage }, content:{ type: Types.Html, wysiwyg: true, height: 400 }, files: { type: Types.File, storage: MediaStorage }, author: { type: Types.Relationship, initial: true, ref: 'User', index: true }, state: { type: Types.Select, options: ['published', 'draft', 'archived'], default: 'published', index: true }, });
nodejs version is v0.10.46
can anyone help me to fix this issue?
thanks,
Hey jed.
I've been trying to update the demo for some time now. It was how I found the date but ;)
Could you review my commits here https://github.com/r3dm/keystone-demo/commits/master
What are your thoughts on the demo code. Should we start from scratch? I think the existing
vision is fine I just wanted to update the project's dependencies and fix any api changes in the
dependencies.
I've had to modify my model and currently playing around with the updates functionality. I have a file named 0.0.1-cities.js
In the file I have the following code:
var keystone = require('keystone');
var Types = keystone.Field.Types;
var Cities = keystone.list('Cities');
module.exports = function(done){
Cities: [
{
photo_file_name: {type: Types.CloudinaryImage, index: true},
}
]
};
When the update runs it hangs in the console no error codes or anything, so while I am pretty sure I am not doing this right, maybe add in some logic to cleanly exit after trying to update for a user defined time?
node version 4.2.4
npm 2.14.12
Edit // Update: Trying to update the photo_file_name from a String to CloudinaryImage
with the username [email protected] and the password demo
can't sign in
Getting an Error: libsass
bindings not found. Try reinstalling node-sass
?
Digging through it seams to be related to the version of node-sass specified in the npm dependancies. Have fixed this by changing node-sass dependancy version to '~2.0.1'. Not sure if I should make a pull request for this issue.
Sign in with the username [email protected]
and the password demo
after installing keystone i run this command node keystone but i m getting error
Error thrown for request: /
Error: Cannot find module 'jade'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at new View (/root/keystone-demo/node_modules/express/lib/view.js:78:30)
at EventEmitter.render (/root/keystone-demo/node_modules/express/lib/application.js:569:12)
at ServerResponse.render (/root/keystone-demo/node_modules/express/lib/response.js:960:7)
at View. (/root/keystone-demo/node_modules/keystone/lib/view.js:330:13)
at /root/keystone-demo/node_modules/keystone/lib/view.js:365:3
at /root/keystone-demo/node_modules/keystone/node_modules/async/dist/async.js:356:16
at replenish (/root/keystone-demo/node_modules/keystone/node_modules/async/dist/async.js:877:25)
at iterateeCallback (/root/keystone-demo/node_modules/keystone/node_modules/async/dist/async.js:867:17)
at /root/keystone-demo/node_modules/keystone/node_modules/async/dist/async.js:840:16
at /root/keystone-demo/node_modules/keystone/node_modules/async/dist/async.js:3694:9
at /root/keystone-demo/node_modules/keystone/node_modules/async/dist/async.js:356:16
at eachOfArrayLike (/root/keystone-demo/node_modules/keystone/node_modules/async/dist/async.js:929:9)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.