Git Product home page Git Product logo

apostrophe-sandbox's Introduction

Apostrophe Sandbox

This project powers the live Apostrophe demo. Feel free to study it, but you're better off forking the apostrophe boilerplate project when creating new projects of your own.

In fact, you're best off the creating your first project tutorial, which covers how to use apostrophe-cli to speed through that process.

This project contains overrides to automatically log the user in and to prevent easy editing of the admin account. You don't want these things in a non-demo project.

apostrophe-sandbox's People

Contributors

alohaas avatar benirose avatar boutell avatar codenprose avatar danielmahon avatar etodanik avatar grdunn avatar jsumnersmith avatar kylestetz avatar lexagosto avatar mattmcmanus 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

apostrophe-sandbox's Issues

How to subclass (override templates) for blog module?

Can you provide a more complete example of how to override the blog templates? I tried following the directions in apos-snippets and the uncommented the require in the sandbox's app.js. Im getting jQuery selective errors and it doesnt seem that the original blog module is being setup correctly. Thanks, im still digging through all the pieces trying to figure out whats going on.

How to install Imagemagick for Apostrophe Cm

How should I install imagemagick for apostrophe cms. I have installed it via the npm install imagemagick command, however i'm still receiving a similar issue #24.

Operating System : Windows 7 64 bit
Server : Node.js
Database : Mongodb

Media Upload

Hello!

When I try to add some media via drag n drop (i.e. in a slideshow pref window) I get this error and the server shuts down:

I see no data/port file, defaulting to port 3000
Listening on port 3000
.write(string, encoding, offset, length) is deprecated. Use write(string, offset, length, encoding) instead.

events.js:77
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
    at exports._errnoException (util.js:671:11)
    at Process.ChildProcess._handle.onexit (child_process.js:776:32)

ps I really like the approach of your system and I would like to get it known better, but somethings are missing in the documentation. If there is a better way, to ask questions then trough issues, let me know!

Best regards,
Pete

firefox bugs

Here is a collection of bugs, and or Problems with the sandbox using firefox

  • Unable to change size of images within a blog or set their float position for text .
  • Focus problems after adding a blog to a area (unable to click the save button)

Admin - Edit User Error

I've taken a clone of the repo, run npm install, then node app.js apostrophe-users:add admin admin, then node app. Logging in as admin and creating a new user. After creating the user and then editing a user record (e.g. change permission level), the error below is thrown. Since no code or db modification has been made, it looks to be an issue with apostrophe-pieces\lib\api.js. The uncaught error is being thrown here showing the callback as undefined.

self.beforeUpdate = function(req, piece, options, callback) {
return setImmediate(callback);
};

Can you suggest a patch for this? Thanks.

(node:10508) DeprecationWarning: crypto.pbkdf2 without specifying a digest is de
precated. Please specify a digest
timers.js:664
throw new TypeError('"callback" argument must be a function');
^
TypeError: "callback" argument must be a function
at exports.setImmediate (timers.js:664:11)
at self.beforeUpdate (C:\bh\sb1\node_modules\apostrophe\lib\modules\apostrop
he-pieces\lib\api.js:300:12)
at C:\bh\sb1\lib\modules\apostrophe-users\index.js:51:16
at C:\bh\sb1\node_modules\apostrophe\lib\modules\apostrophe-docs\lib\cursor.
js:762:16
at C:\bh\sb1\node_modules\async\lib\async.js:52:16
at C:\bh\sb1\node_modules\async\lib\async.js:1209:30
at C:\bh\sb1\node_modules\apostrophe\lib\modules\apostrophe-docs\lib\cursor.
js:1010:16
at C:\bh\sb1\node_modules\async\lib\async.js:52:16
at Immediate. (C:\bh\sb1\node_modules\async\lib\async.js:269:32)
at Immediate. (C:\bh\sb1\node_modules\async\lib\async.js:44:16)
at Immediate.wrapper (C:\bh\sb1\node_modules\lodash\index.js:3592:19)
at runCallback (timers.js:637:20)
at tryOnImmediate (timers.js:610:5)
at processImmediate as _immediateCallback

CSS missing

Hello,

On a fresh install of the apostrophe-sandbox on OSX I noticed the following in the Safari logs

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (editor.css, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (editor.css, line 0)

I then checked the console to find this

Error: ENOENT, stat '/path_to_project/node_modules/apostrophe-ui-2/public/css/editor.css'
Error: ENOENT, stat '/path_to_project/node_modules/apostrophe-ui-2/public/css/editor.css'

So I am guessing it is either an issue in my file system, or an assumption in the code.

I just started getting into the code, so I cannot provide a more thorough explanation of why this is happening.

Cannot find module 'apostrophe-groups'

I did a brand fresh clone from this, npm install run through. After node app.js or node app.js apostrophe:reset i got this:

module.js:340
    throw err;
          ^
Error: Cannot find module 'apostrophe-groups'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at initAposGroups (/Users/gregor/projects/research/apostrophe-sandbox/app.js:209:16)
    at /Users/gregor/projects/research/apostrophe-sandbox/node_modules/async/lib/async.js:486:21
    at /Users/gregor/projects/research/apostrophe-sandbox/node_modules/async/lib/async.js:185:13
    at iterate (/Users/gregor/projects/research/apostrophe-sandbox/node_modules/async/lib/async.js:108:13)
    at /Users/gregor/projects/research/apostrophe-sandbox/node_modules/async/lib/async.js:119:25
    at /Users/gregor/projects/research/apostrophe-sandbox/node_modules/async/lib/async.js:187:17

it's not on npm. i guess it's because it's called apostrophe-people now, but it's not changed in the sandbox code. i edited my local app.js to apostrophe-people, then it worked.

Why not issue a node app.js apostrophe:reset when db is empty

Hi,

I noticed that I can start node app.js even without calling apostrophe:reset however the features are not complete. So I included node app.js apostrophe:reset and it resolved the issue.

My suggestion is to automatically issue node app.js apostrophe:reset when the db is empty. Currently I'm having issue with openshift with this because I can't issue this command directly in my remote.

Regards

Error: Cannot find module 'appy'

Hi there!

When I try to run:
node app.js apostrophe:reset

I'll get the error:

module.js:334
    throw err;
          ^
Error: Cannot find module 'appy'
    at Function.Module._resolveFilename (module.js:332:15)
    at Function.Module._load (module.js:274:25)
    at Module.require (module.js:358:17)
    at require (module.js:374:17)
    at Object.<anonymous> (/[PATH TO]/apostrophe-sandbox/app.js:1:74)
    at Module._compile (module.js:450:26)
    at Object.Module._extensions..js (module.js:468:10)
    at Module.load (module.js:350:32)
    at Function.Module._load (module.js:306:12)
    at Function.Module.runMain (module.js:491:10)

Openshift Issues: Specifying IP and Port, Moving all writable data to specific dir

  1. I can't specify Openshift's environment IP and port:

process.env.OPENSHIFT_NODEJS_IP
and
process.env.OPENSHIFT_NODEJS_PORT

I edited appy.js for this to work.

  1. Openshift's repository is write protected, there is a special folder in Openshift to write data: process.env.OPENSHIFT_DATA_DIR. Please advise what are the things that need to be changed. Thank you.

Page children not populated

This was working in a previous version of the sandbox. Currently, this seems broken and I can't seem to create a dropdown menu since this isn't working.

This example code does not work on a fresh sandbox site in that it's not showing the "relative" (child) links for subpages.

        {% for tab in page.tabs %}
          {% if tab.slug == page.slug %}
            <li class="tab current-page">{{ pageLink(tab) }}</li>
          {% else %}
            <li class="tab">{{ pageLink(tab) }}</li>
          {% endif %}

          {% for relative in tab.children %}
          {{ relative }}
          {% endfor %}
        {% endfor %}

Will there be markdown?

Hello!

As I said, I really like your system! But is there a chance that there will be the possibility to write markdown in the backend?

Cheers,
P

Hanging when runing "node app.js apostrophe:reset"

I'm trying to create new project. I have empty database located on the server. If I run command "node app.js apostrophe:reset" the command hangs and nothing happens. local.js is created under the data folder and npm modules are installed. Can you point to what am I doing wrong? Thank you.

Improve CSS Modularity

I'm not sure if I'm misinformed here, coming at this from an angle which includes all the boilerplate associated with the demo/sandbox project. But I'm looking at public/css/sites.less and trying to skin the project for my own purpose - ran into alot of interdependencies when I tried to rip everything out to style the theme custom for my project.

So, first some questions:

  1. is there another places, besides site.less where I should be removing certain assets as dependencies?
  2. Is there a separation between public / "anon" styles and logged-in / "admin" styles because in my experimenting I found them to be quite interdependent, maybe I'm missing something.

If the answer to the above is "no", then I think the project could stand some improvement in CSS architecture / dependency / some kind of logical modularity and extensibility.

I feel like the project is way too well architected for this to be an Achilles heel, I'm probably just missing some bit of information.

demo2 open source?

Hi guys

I'm curious if the very impressive demo2 page is open source as well.
If yes, where can I find it?

I think looking at the source of this would be better than any tutorial.

no image backend specified and neither imagecrunch nor identify found in PATH

I've succesfully insatlled Apostrophe - Sandbox by downloading and placing the files in the directory that I would like the site installed. I followed all of the correct instructions, however when I get to the part where it says to type " node app.js apostrophe:reset" I keep receiving this error. The only way around this error is by editing the file in \apostrophe-sites\index.js on line 492 which is where the error is being thrown.
Also Imagemagick is installed in the root folder of the site, but it is still not recognizing that I have it installed. Are there additional settings or changes that I need to make ?

Operating System : Windows 7 64 Bit
Server : Node.js
Database : Mongodb

Add multi-layout Call to Action to home page areas

  1. Write the markup and styles for the three layout options from the designs (sketch file)
  2. Use 'apostrophe-schema-widgets' module to build a schema-widget for the CTA.
  3. Add the schema-widget to the aposAreas in the home page template.

  • User should be able to select one of three Layout options
  • User should be able to provide a Heading, Sub-Heading, Destination url, and an Image to render the CTA (depending on which layout they choose)
  • [bonus] Add the options to provide a Page instead of a url for the link destination.

404's for `modules/my-{var}/js/content.js`

Not sure why or how this originated, but I've got 404's for the following:

modules/my-blog/js/content.js
modules/my-case/js/content.js
modules/my-groups/js/content.js

I don't know why the my-{something} directory would be searched for any content, I thought the way to override base functionality was to fork it inside /lib/modules/{original-dirname}?

Issues adding and editing images

The add image to page seems to behave erratically. For example, I have these images in the Images "library" section (Apos admin bar > Images):

ss3

I then try to add one of these images to a page:

ss1

but the "Choose Images" modal shows no images (no results for current filters with no filter criteria).

ss2

Why can't I select an image from the list of images already added to the image "library"?

Also, if I try directly adding the image to the page using "New Image", the image won't save and there is no error thrown in console. I add the image, title it, select published=yes and click Save Image button, but the "Choose Images" modal is empty, however, the page shows the "Edit Image" button, even though the image isn't displayed on the page or in the "Choose Image" modal.

ss4

(clicking the "Edit Image" button shows the empty "Choose Image" modal)

ss2

How to add Modules

Hello!
In my last installation all modules were enabled (e.g. apostrophe-events) in the admin bar. Now, only the basic modules are enabled and the schema of the app.js is different. So, I don’t no how to enable events and people etc.

Would be nice if there were a code snippet in the particular modules’s ReadMe.md which can be than copied, pasted & modified.

Thanx!

can not login via admin/demo

I downloaded the sandbox project today and ran it following forma guide. When i tried to log in with default user name (admin) and password(demo), it does not work. There're no error to show what has happened.

how can i resolve this problem? thanks

Responsive LESS file structure

I've been working a lot with the Bones theme for Wordpress, and I found their LESS structure very useful.

Basically, they split the responsive design into a few files:
base.less
481up.less (for 481px width and upwards)
768up.less (768 and upwards e.t.c)
1030up.less
1240up.less
2x.less (for retina)

Then, there is a main style.less file where these files are imported inside of the appropriate media query:
https://github.com/eddiemachado/bones/blob/master/library/less/style.less

This makes designing a responsive large website a breeze. You're basically working small screen first (in base.less), and then add as the screen grows.

It's kept in separate files, so large scale sites are super easily maintained.

How would you feel about introducing a similar files structure to the LESS files in Apostrophe Sandbox?

Error when trying to add a new page and on the 404 page.

The chances of this happening are low, but I came across it...

Uncaught TypeError: Cannot read property 'type' of undefined editor.js:158 apos-pages/js/editor.js

Since apostrophe is likely trying to guess what page type im on currently?

Homepage got a "Not Found"

It's great to see the sandbox. thanks for made this happen. I got a "Not Found" on homepage when run node app.js
any hint on this?

Thanks.

Inserting links isn't intuitive!

The GUI suggest me that I can insert the link by providing a url (or mail address) and a anchor name. But that doesn't work!

First I have to type the anchor name and highlight it, then I klick the link button to enter the link overlay there I provide the url and an anchor name and after clicking "ok" the link is behind the highlighted anchor name (the anchor name from the GUI doesn't have any effect).

That's not like it should be.

symlink error after node app.js apostrophe:reset and node app.js

I've tried multiple different manners of getting this working.
cleaned npm cache upgraded to the most recent version of nodeJS
Nothing fixes this symlink error in the image below.

Clean clone of the repository as current to the date of 4/11/2014.
Clean install of mongodb and run it.
cd github/apostrophe-sandbox
mkdir data (copied local.example.js to data/local.js)
npm install
node app.js apostrophe:reset (additionally tried "node app apostrophe:reset")
node app.js (additionally tried "node app")

error main

Any interest in integrating grunt?

Is there any interest in officially having grunt used as part of the apostrophe-sandbox repo?

I could see a benefit mainly for little things such as livereload.

Also, is there any reason minification is handled manually rather than by something like grunt?

linkall.sh improvements

I was just going through linkall.sh, and it occured to me that we're not using npm install --link, but rather emulating its' effect. Is there any good reason?

npm install --link technically does exactly what we want - it installs, and links where possible.

So basically, all we'd need to do is one loop that does:

  • Check out the repository to src
  • npm link it

Another loop that npm install --link's everything in src.

And then a third single command that runs npm install --link once at project level.

Meta / byline for "Author"

I've got most everything I need for the designs I'm working with out of Apostrophe and I'm incredibly impressed by your work... first major surprise was this line in blogMacros.html:

{# TODO: add byline once the author field is worked out in A2 #}

Unfortunately this feature is a deal breaker since blogging is central to my use case and the intent is that many different users can have a list of their blog entries on their /people/person page. Can you document a bit about what is meant by "once the author field is worked out in A2"? Can I help with this feature and submit a PR in order to get myself unblocked on this?

Permission 'admin-blog-post' does not show posts by other users

Shouldn't users with admin- level be able to edit posts by other users? I've set the permissions on a group to:

self.apos.users.insert(req, {
username: emailAddress,
email: emailAddress,
title: first_name : 'title',
//anything other than admin will not let you edit (or view) others posts
permissions: [mscr == 36 ? 'admin-blog-post' : 'admin' : ''],
}, { permissions: false }, getUser(loginUser, callback));

But only users with 'admin' permission can edit other posts. Is there a way to allow a group of users to have control over blog posts (any posts) but restrict access to other portions of the site (e.g. pages or users)?

Cannot find module 'apostrophe-twitter'

Strickly following the tutorial leads to this error

/tmp/apostrophe-sandbox > node app apostrophe:reset
Ran initial Browserify asset bundling.

module.js:340
    throw err;
    ^
Error: Cannot find module 'apostrophe-twitter'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at /private/tmp/apostrophe-sandbox/node_modules/apostrophe-site/index.js:367:29
    at iterate (/private/tmp/apostrophe-sandbox/node_modules/apostrophe-site/node_modules/async/lib/async.js:149:13)
    at /private/tmp/apostrophe-sandbox/node_modules/apostrophe-site/node_modules/async/lib/async.js:160:25
    at Object._onImmediate (/private/tmp/apostrophe-sandbox/node_modules/apostrophe-site/index.js:488:16)
    at processImmediate [as _immediateCallback] (timers.js:345:15)

The fix is removing the 'apostrophe-twitter' from data/local.js. I am just opening the ticket since a new user may be discouraged getting an error off the get go

Impossible te see page menu

Hello!

I tried this sandbox demo in local, everything sound right but the page menu doesn't appear at the bottom. Did i missing something ?

Thank's

How to install Imagemagick for Apostrophe Cms

How should I install imagemagick for apostrophe cms. I have installed it via the npm install imagemagick command, however i'm still receiving a similar issue # .

Operating System : Windows 7 64 bit
Server : Node.js
Database : Mongodb

lib/modules/company contains a symlink

The only thing currently in apostrophe-sandbox / lib / modules / company currently is a symlink to an absolute path that's not included in the sandbox (/Users/boutell/node-sites/sandbox/public/assets/apos-my-company).

404's for `modules/my-{var}/js/content.js`

Not sure why or how this originated, but I've got 404's for the following:

modules/my-blog/js/content.js
modules/my-case/js/content.js
modules/my-groups/js/content.js

I don't know why the my-{something} directory would be searched for any content, I thought the way to override base functionality was to fork it inside /lib/modules/{original-dirname}?

Apostrophe has search, please add it to the sandbox

Please add a search box to the sandbox design. There is a search page at /search which is expecting the search text to be in the "q" query string parameter, very easy to target.

Please also style the search.html template for the sandbox.

DRWC has nice styles for this.

deploying to heroku/mongolab

I am trying to get the sandbox running on heroku.

I have added a mongolab DB and can run the sandbox of that on my local.

But when I upload to heroku all i can get is an "h10" error - appcrashed - that's it..

What are the requirements to change in app.js, local.js, or what ever to deploy to heroku?

thanks in advance

Login page invisible when HTML5 doctype is in place

Hi
I have deployed the apostrophe-sandbox project to DigitalOcean ubuntu 14.04 strictly following https://github.com/punkave/stagecoach . Everything is working fine except when I click the "login" button, it open a new view and tries to load, but ultimately, it comes nothing. Also there's no any debug/logo info in Chrome development console.

you can see this via: http://192.241.250.166/login

by the way, it's working perfectly in local enironment via : node app.js

Thanks

Blog page type links point to invalid URLs when used on the home page

Hello! I am having issues with the blog, just set a new site up days ago according to instructions, and the blog is not fully working, at least when used on the home page. The blogs titles are shown on the blog page type, but the links point to a weird URL and don't work.

Edit: after further plunking, I realized a few things - when the homepage is page type 'Blog', it seems to just be dropping the domain name from the URL slug. (not the case when any other page in the site) I only realized this when looking at the page in Firefox, the bogus URLs are different between Firefox & Chromium

Here's an example link to a blog post from blog home page-
On Chromium: http://0.0.7.222/03/05/new-site
On Firefox: http://2014/03/05/new-site

Weird, huh?

The URL in the RSS feed is also wrong, but is the same on both browsers: http://2014/03/05/new-site
RSS feed at least displays properly on firefox even though the links don't work, but this is probably a separate issue. The links in the RSS feed on any blog type page that is not the home page are correct

BTW, is this the proper place for me to be reporting bugs like this? I am making a site using apostrophe-sandbox (and doing git pulls every so often), but I'm not 100% sure where issues like these fit best into your development model and I want to be as helpful as possible. Thanks!

Clarification regarding Apostrophe's file structure

Does Apostrophe use any file structure conventions?

I'm trying to understand heads from tails since I have never seen a project organized like this before. If it's an established convention, can you point me to where it is documented?

I appreciate all the help so far, Tom! I'm new to Node, and Express, so I'm hitting some roadbumps :)

Cannot read property 'addFieldType' of undefined

I just tried running the sandbox following the steps on the website, but I'm getting the following error.

/projects/apostrophe-sandbox/node_modules/apostrophe-people/index.js:184
  self._schemas.addFieldType({
               ^

TypeError: Cannot read property 'addFieldType' of undefined
    at new people.People (/projects/apostrophe-sandbox/node_modules/apostrophe-people/index.js:184:16)
    at people (/projects/apostrophe-sandbox/node_modules/apostrophe-people/index.js:27:10)
    at initAposPeople (/projects/apostrophe-sandbox/app.js:171:42)
    at /projects/apostrophe-sandbox/node_modules/async/lib/async.js:551:21
    at /projects/apostrophe-sandbox/node_modules/async/lib/async.js:227:13
    at iterate (/projects/apostrophe-sandbox/node_modules/async/lib/async.js:134:13)
    at /projects/apostrophe-sandbox/node_modules/async/lib/async.js:145:25
    at /projects/apostrophe-sandbox/node_modules/async/lib/async.js:229:17
    at /projects/apostrophe-sandbox/node_modules/async/lib/async.js:556:34
    at /projects/apostrophe-sandbox/node_modules/apostrophe-map/index.js:284:14

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.