Coder Social home page Coder Social logo

rooftopcms / rooftop-cms Goto Github PK

View Code? Open in Web Editor NEW
220.0 220.0 23.0 9.1 MB

Rooftop CMS is an API-first WordPress CMS for developers and content creators

Home Page: http://www.rooftopcms.com

License: GNU General Public License v3.0

Ruby 52.86% PHP 35.89% Shell 11.25%

rooftop-cms's People

Contributors

chrishardie avatar danhigham avatar hhsnopek avatar phendrick 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

rooftop-cms's Issues

GravityForms integration

Might need to break this into more than one ticket:

  • Expose GF fields
  • accept GF responses back into Rooftop

Wordpress connection issues

Hey guys, I'm setting up the self hosted rooftopcms for wordpress. I've tried to install the rooftop-api-authentication plugin on my hostgator hosted wordpress install, but I keep getting an error when I attempt to activate the plugin. error - Parse error: syntax error, unexpected T_FUNCTION in /home2/jnashpor/public_html/railstest/wp-content/plugins/rooftop-api-authentication-development/admin/class-rooftop-api-authentication-admin.php on line 109. I was initially using wordpress version 4.7.4, but then downgraded to 4.3 to follow the tested version of the plugin as seen in the plugin repo. Is rooftop-api-authentication the correct plugin that I should be using to connect rooftopcms to my wordpress app or is there some other way I should be making the connection?

VPS Deployment

Hey guys I just got rooftop-cms to work on a droplet. Here's the run down on how to set it up and some issues I'm still having.

Issues

  • Unable to create an API so I may fetch my content

Building/Deploying

Assumptions:

  • The public/web dir is located at /web

OS: ubuntu 14.04

Dependencies:

One Liner:
apt-get install -q -y curl php5-cli php5 php5-mysql git mysql-server nginx php5-fpm php5-curl redis-server

List:
- curl
- php5-cli
- php5-mysql
- php5-fpm
- php5-curl
- redis-server
- mysql-server
- nginx
- git

Modified vvv-init.sh:

echo "Starting Rooftop"
echo "----------------"
echo "Starting mysql"
nohup /usr/bin/mysqld_safe 2>&1 &
service mysql start
sleep 5
mysqladmin -u root --password 'root'

echo "Starting redis"
nohup redis-server &

echo "Configuring hosted wordpress CMS"
cd /web
composer install

echo "Creating database (if it's not already there)"
mysql -u root -e "CREATE DATABASE IF NOT EXISTS $DB_NAME"
mysql -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO $DB_USER@'$DB_HOST' IDENTIFIED BY '$DB_PASSWORD';"

echo "Installing Wordpress Core"
wp core multisite-install --subdomains --url=${WP_URL} --title="Hosted Wordpress" --admin_user=${WP_ADMIN_EMAIL} --admin_password=${WP_ADMIN_PASSWORD} --admin_email=${WP_ADMIN_EMAIL} --allow-root --path=web/wp

echo "Starting php5-fpm & nginx"
service php5-fpm start
service nginx start

This is the modified requirements to public/composer.json, this is required as a couple deps aren't OSS by the rooftop team currently.

  "require": {
    "php": ">=5.4",
    "composer/installers": "~1.0.12",
    "vlucas/phpdotenv": "^2.0.1",
    "johnpbloch/wordpress": "~4.4.0",
    "wpackagist-plugin/rest-api": "2.0-beta9",
    "rooftopcms/rooftop-preview-mode": "dev-development",
    "rooftopcms/rooftop-api-authentication": "dev-development",
    "rooftopcms/rooftop-admin-theme": "dev-development",
    "rooftopcms/rooftop-response-sanitiser": "dev-development",
    "rooftopcms/rooftop-gravityforms-exposer": "dev-development",
    "rooftopcms/rooftop-webhooks-admin": "dev-development",
    "rooftopcms/rooftop-acf-exposer": "dev-development",
    "rooftopcms/rooftop-content-hierarchy": "dev-development",
    "rooftopcms/rooftop-content-fields": "dev-development",
    "rooftopcms/rooftop-custom-content-setup": "dev-development",
    "rooftopcms/rooftop-content-settings": "dev-development",
    "rooftopcms/rooftop-response-headers": "dev-development",
    "rooftopcms/rooftop-queue-pusher": "dev-development",
    "rooftopcms/rooftop-s3-upload-setup": "dev-development",
    "wpackagist-plugin/amazon-web-services": "0.3.4",
    "wpackagist-plugin/wp-api-menus": "1.2.0",
    "predis/predis": "~1.0.3",
    "icanboogie/inflector": "1.3.3",
    "wp-cli/wp-cli" : "~0.22",
    "psy/psysh" : "~0.6"
  }

Bulk actions

When flicking through pages of templates, the bulk actions box selection deselects. Hence, I guess it is not possible to bulk action an entire site in one go. Is that correct?

Support - Query

Just checking if Rooftop has a 'support' to end-users (clients with very little technical knowledge). Hence end-user could contact their 'technical providers' directly.

Add Wordpress importer plugin

We should have the WordPress importer plugin installed so people can migrate to rooftop easily. This needs some thought to make sure we aren't going to bog down the servers with long-running synchronous requests

Need API docs

We need to write API docs. The OPTIONS endpoint should self-describe the service (which needs work too), but we need some human-readable docs too. readme.io?

LICENSE and readme mismatch

The readme indicates this project is MIT licensed though the LICENSE file indicates it is GPL licensed. Could you please clarify?

README.MD

What's the licence for Rooftop?

This project is MIT licenced (see the LICENCE file in this repo), so if you want to host it yourself, you can.

LICENSE

               GNU GENERAL PUBLIC LICENSE

_embed GET querystring breaks API responses

According to these docs we should be able to automatically embed relations into a response by passing _embed as a GET querystring.

But when we do, we get an error in the REST API plugin:

Fatal error: Cannot unset string offsets in /srv/www/rooftop-cms/public/web/app/mu-plugins/rest-api/lib/endpoints/class-wp-rest-controller.php on line 179

Interesting, this is an identical error to the one produced by #5

The /media endpoint is broken

Hitting the /media endpoint gives an error from the REST API plugin:

Fatal error: Cannot unset string offsets in /srv/www/rooftop-cms/public/web/app/mu-plugins/rest-api/lib/endpoints/class-wp-rest-controller.php on line 179

install errors

Hi, I ran into a handful of issues when trying to spin up my own version of rooftop. I worked past issue #22 but still couldn't get things running. I'm pretty unfamiliar with vagrant so I'm assuming that I probably just missed a basic setup step somewhere - any pointers would be appreciated. Once I can get this up and running I'd be happy to submit a PR with updated documentation and/or code.

Installation steps

  • install vagrant (1.8.4)
  • install virtualbox (5.0.22)
$ brew install homebrew/php/php55-pcntl
$ git clone https://github.com/rooftopcms/VVV.git
$ cd VVV/www/
$ git clone https://github.com/rooftopcms/rooftop-cms.git
$ composer install -d rooftop-cms/public/
-bash: composer: command not found

To update the composer lock file I ran $ php composer.phar update -d rooftop-cms/public/, which continued to fail until I had made the following changes to composer.json:

  • change line 41 to use https (http fails ): ("url": "https://wpackagist.org")
  • change line 136 to use any version over 0.3.4 rather than specifying explicitly (package wasn't available) : "wpackagist-plugin/amazon-web-services": "^0.3.4",

Finally, I ran vagrant up which took awhile but seemed to work fine - I could ssh into the box afterwards and everything. But when I point my browser to http://rooftop-cms.dev there doesn't seem to be anything there. I'm too naive about the tools involved to know where to turn next, but here's some guesses I had:

  • there were some error messages during the vagrant up command suggesting that mysql wasn't configured properly - are there additional DB settings that I need to configure (maybe .env) ?
  • am I in the wrong directory? all of these commands were executed inside the /www folder but there's a Vagrantfile at VVV/'s root ...?
  • is there another config step involved to have the virtual box intercept the http request to rooftop-cms.dev - not really sure how this works
  • are there any other basic configuration steps needed with virtualbox or vagrant that a first-time user would need to set up to get this working?

Call to missing post / page returns error instead of 404

A call to e.g. /wp-json/wp/v2/posts/123456 where post 123456 doesn't exist returns an error:

Notice: Undefined property: stdClass::$show_in_rest in /srv/www/rooftop-cms/public/web/app/mu-plugins/rest-api/lib/endpoints/class-wp-rest-posts-controller.php on line 858

It should just return a 404 instead.

API URL not available / wp_api_keys is not created

Hello,

I have installed Rooftop CMS on my own AWS EC2 instance, and I have followed the following guide: https://rooftopcms.readme.io/docs/installing-a-development-environment except for the VVV part of course.

The CMS itself seems to be working fine. When I tried to add a user for the API key, I got an error. After checking out the issues on GitHub, the fix in issue #28 seems to have worked for me as well by creating the appropriate table:

CREATE TABLE wp_api_keys ( id MEDIUMINT NOT NULL AUTO_INCREMENT, key_name VARCHAR(256) NOT NULL, domain VARCHAR(256) NOT NULL, api_key VARCHAR(256) NOT NULL, user_id INTEGER NOT NULL, PRIMARY KEY(id), INDEX(domain), INDEX(api_key));

After this I was able to create the user, but I was not able to authenticate with this API key, because it seems that the /wp-json/wp/v2/posts is missing. I unfortunately receive a 404.

What could possibly go wrong here? Did I miss a step or something that specifically creates MySQL tables, and installs the API endpoint etc? If you need more information, please let me know.

Thank you in advance!

composer install error - "Could not read from remote repository"

Hi, when I try to run composer install, it throws this error:

[RuntimeException]                                                                                                 
Failed to execute git clone --no-checkout '[email protected]:errorstudio/rooftop-hosted-hooks.git' 'web/app/mu-plugins/rooftop-hosted-hooks/' && cd 'web/app/mu-plugins/rooftop-hosted-hooks/' && git remote add composer '[email protected]:errorstudio/rooftop-hosted-hooks.git' && git fetch composer
Cloning into 'web/app/mu-plugins/rooftop-hosted-hooks'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.

Is it me or there's an error? How can I fix it?
Thanks

RT - Quick Edit Bug

Quick edit does not work - neither parents or templates - or any changes to pages seem to appear there. I hope this helps. Also, would it be possible to have last updated in Pages, please?

API accounting proposal

Here's my plan for API request accounting:

Overview

  • Use Lua with Nginx to write to a redis hash
  • Display current month's count in the api view
  • Set alert threshold to raise webhook and/or send email
  • Show long-term trend on a graph

Data capture and storage

We'll use Nginx and Lua to increment a counter in Redis, synchronously with the request. It's very fast.

Data structure in Redis

There are various options for data structures. If we just want this month's usage, that's pretty simple:

Simple counter

key: api_accounting:[sitename].rooftopcms.io:[api_key]
value: [int]

You can INCR on the value to keep the counter up to date.

Sorted set for timeseries

We could use sorted sets to store timeseries data:

key: api_accounting:[sitename].rooftopcms.io:[api_key]
score: [timestamp]
value: {
   timestamp: [timestamp,
   count: 1
}

We don't need to increment the counter; a new member is added to the sorted set for each request. Querying ranges will be very inexpensive because the timestamp means we already have the data date-sorted. I don't know how to SUM the count, though.

Displaying the counters

In its simplest form, we could just show the current month's counters against the API key. It would be nice to poll the count periodically and raise an alert (webhook and/or email) if it went over a predefined threshold.

Using the nested set approach, if we can cheaply sum, we could graph requests over time.

Fix "View site" link

in wp-admin, the "View site" link points to / which is an empty page - we should make that link point to /wp-admin

Breaking change in _links on taxonomies

the _links array on a taxonomy now includes wp:items instead of "items" which breaks the rooftop-ruby implementation.

We should continue to return "items" for backwards compatibility.

Make S3 setup more flexible

It would be nice to allow users to set a different region for their S3 buckets, and maybe specify a name.

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.