Giter Club home page Giter Club logo

keystone-demo's People

Contributors

andrzejs avatar anpfeff avatar augbog avatar bassjacob avatar bladey avatar darryld avatar eduardoac avatar jedwatson avatar jossmac avatar jstockwin avatar mcauser avatar morenoh149 avatar mxstbr avatar rbelouin avatar stennie avatar tmvanetten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

keystone-demo's Issues

Posts cannot be displayed after creation

Hello,
just wanted to check out the Comments feature. I cloned the repo and run the application with node keystone.js.

  1. I create a post and publish it.

  2. 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 |

Node-sass v1 incompatible with node 0.12.2

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.

Default Date is Invalid in Gallery

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

Using React components on frontend

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!

Choose between different templates in posts wysiwyg editor

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

Error when running demo with .env

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...

Updating Collection Types

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?

screen shot 2016-01-11 at 10 52 35 am

node version 4.2.4
npm 2.14.12

Edit // Update: Trying to update the photo_file_name from a String to CloudinaryImage

npm install throwing an error on ubuntu

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

Fileupload

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

npm start fails

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 ]

Why dotenv removed

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.

Upon updating an existing post publish date doesn't display

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/

Demo user and password not updated

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?

Where can i change database link?

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)

Cannot get comments to post

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?

TypeError: Object #<Object> has no method 'accessSync'

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,

Seeing How Demo Was Built

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 on comment while on post page leads to 404

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

Access control

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.

2 bugs found on new Demo (based on Keystone 0.30) : Authentication and Display Blog

Hi,

I found 2 issues with the new KeystoneJS Demo:

  1. Authentication is not working.
    Example: mongodb://user:password@ip:port/databasename?authSource=admin
  2. The list of blog is displayed correctly but when I click on the title to display the blog in detail view, I got error 404 Sorry, the page you requested can't be found.

Note: I can use the previous version of demo so the problems are related to the new version.

Thank You
Kosona Chriv

Blog post error on post page

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.

Demo not working

after signin up, I couldn't access to the Admin UI, neither add posts, redirected to signin

Using Handlebar helpers inside of template that is dynamically rendered by API call?

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);
                    }
                }
            });
        });

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.