Coder Social home page Coder Social logo

tomjn / frontenberg Goto Github PK

View Code? Open in Web Editor NEW
135.0 12.0 30.0 1.69 MB

A WP theme providing a read only demo of the post block editor on the frontend, provided as is, no support.

Home Page: https://frontenberg.tomjn.com/

PHP 98.52% CSS 1.48%
gutenberg wordpress wordpress-theme php

frontenberg's Introduction

Frontenberg Classic

A limited frontend preview of the Gutenberg editor, not to be confused with a frontend editor. It's literally the Gutenberg block editor post interface, but loaded on the frontend. It also includes some filters to prevent logged out users abusing APIs, but allowing Gutenberg to still function

Also, if you're logged into WP Admin, be careful, other users will see autosave notices and your changes will be saved!

!! Frontenberg is not a frontend editor !! and cannot be used to create a frontend editor.

I Want To Put the Gutenberg Editor in My Theme

This is not the project for you. This is intended to act as a basic sandbox for demonstrating the block editor without installing WP or logging in, it is not a frontend editor component.

Is it Safe in Production?

Probably not, it was built specifically for https://frontenberg.tomjn.com, not as a general purpose block editor component.

There are a lot of restrictions that try to lock down Frontenberg, if any of these are lifted to allow the creation or updating of posts, bugs will occur, and security will be compromised. For example, early versions of Frontenberg allowed people to create terms and other unwanted data on the site that had to be cleaned up and locked down.

Can I Use it On a Client Site?

Do not do this, it is a terrible and dangerous idea.

Can I Use This To Create Frontend Editors?

No, that would be dangerous, and there are lots of known problems. Don't try to use Frontenberg to create a Frontend Editor. Don't expect bug reports to be fixed either unless it impacts the core use of a sandbox e.g. frontenberg.tomjn.com testgutenberg.com or wordpress.org/gutenberg

What Should I Use Instead Then To Create Frontend Editors?

Use the BlockProvider and BlockList components provided by Gutenberg

This Doesn't Work With XYZ

Good to know, but this project isn't supported for integrations with client work or other projects. This is a sandbox project.

Installation

It's a WP theme, upload and activate and make sure you have the Gutenberg plugin installed and activated first.

Troubleshooting

This theme is not in any way production ready, outside of the thin scope of frontenberg.tomjn.com, you will almost certainly encounter issues. Also keep in mind that a lot of frontenberg issues are actually Gutenberg issues. Test in a local environment with the Gutenberg plugin first

frontenberg's People

Contributors

dovy avatar moorscode avatar salcode avatar timelsass avatar tomjn 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

frontenberg's Issues

Layout options alignwide or alignfull are missing

This is a great resource - thank you.

The full-wide example is a little confusing as the layout options do not include alignfull even though it is being used.

screenshot 2018-01-20 12 17 28

I suspect if we add

add_theme_support( 'align-wide' );

to functions.php, we can add both the alignwide and alignfull layout options.

Undefined function

Hi @tomjn,

Not sure if this repo is still in development, I thought I would give it a try. However it's resulting in the following error so it won't work for me:

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'gutenberg_editor_scripts_and_styles' not found or invalid function name in C:\xampp\apps\wordpress\htdocs\wp-includes\class-wp-hook.php on line 286

Add fixed block on where to report issues

This is an awesome resource and as a result bugs may be found. There are a few things we could maybe do with a little block that can't be removed.

  • Mention where to report Gutenberg bugs.
  • Mention to test in non Frontendberg install any bug you find, just incase there's a difference.
  • Mention to report here if it's a Frontendberg bug.

Does not Work with Page Post Type

It works great with 'post' post type but when I am trying to use for page post type it does not work for logged out users on frontend.

It works for logged in users.

doesn't work with Gutenberg 4.9

Hi,

I use Frontenberg on my website and it works great with Gutenberg 4.8. However, when I updated Gutenberg to version 4.9, Frontenberg didn’t work anymore. I got this error in php_errorlog:

PHP Fatal error:  Uncaught Error: Call to undefined function get_current_screen() in /wp-content/plugins/gutenberg/lib/client-assets.php:1338
Stack trace:
/wp-includes/class-wp-hook.php(286): gutenberg_editor_scripts_and_styles('')
/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
/wp-includes/script-loader.php(2231): do_action('wp_enqueue_scri...')
/wp-includes/class-wp-hook.php(286): wp_enqueue_scripts('')
/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
/wp-includes/general-template.php(2614): do_action('wp_head')
/wp-content/themes/Frontenberg-master/header.php(7): wp_head()
/wp-content/plugins/gutenberg/lib/client-assets.php on line 1338

Do you have any idea? I don’t know if I am the only person having this issue with Gutenberg 4.9.
Please, try to check if you have the same issue with the new version of Gutenberg.

Thanks.

Uncaught TypeError: Cannot read property 'switchEditorMode' of null

I think I've found my issue. I am getting the following error:

actionHelper.js:7 Uncaught TypeError: Cannot read property 'switchEditorMode' of null
    at Module../src/stores/actionHelper.js (actionHelper.js:7)
    at __webpack_require__ (bootstrap:79)
    at Module../src/plugins/sidebar-share/sidebar.js (index.js:15)
    at __webpack_require__ (bootstrap:79)
    at Module../src/plugins/sidebar-share/index.js (index.js:1)
    at __webpack_require__ (bootstrap:79)
    at Module../src/index.js (index.js:1)
    at __webpack_require__ (bootstrap:79)
    at checkDeferredModules (bootstrap:45)
    at bootstrap:152

The code in question is no more than const {switchEditorMode} = dispatch('core/edit-post');.

I think something isn't loading properly. Any ideas? It works if I go the admin path.

Unable to run theme - undefined function get_plugin_data()

I apologize, I'm sure I'm missing something obvious. When trying to run this site locally, I'm getting the following error.

Fatal error: Uncaught Error: Call to undefined function get_plugin_data() in /app/public/wp-content/themes/Frontenberg/index.php on line 20

Other than adding the Gutenberg plugin, this is an unmodified Local by Flywheel installation.

Any thoughts on what I'm missing? Once I get this sorted, I'd be happy to submit a PR for a README.md file with the information in case anyone else has the same issue.

Thanks.

screenshot 2018-01-20 12 28 18

Stuck in code view

Hi!

I love your frontenberg demo, and usually use it to demonstrate GTB for clients. Today I discovered that it seems to be stuck in the code-view mode. And I hope you'd take a look at it if you're still supporting this!

Take Frontenberg private and lock things down

I'm not paid to maintain this and I don't intend to provide support for others. But I'm also finding that even then people are relying on this repo for critical things. There are 30 forks! I need a solution to this. This is opensource because I believe things should be open, not as a product/service.

Right now my thinking is to re-engineer this to instead use the site editor, and build it as a plugin. If I do so I'm inclined to do it in a new private repo. I don't want it forked and put up on wordpress.org without attribution, and I don't want to have to spend time figuring out the weird things people did to it trying to build frontend editors but still expecting support.

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.