Giter VIP home page Giter VIP logo

sprout3's People

Contributors

aitken85 avatar andrew-kb avatar carbsrule avatar gwillz avatar jamiemonksuk avatar jedso avatar kbjana avatar lucysparks avatar lukekb avatar thejosh 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

Watchers

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

sprout3's Issues

Use page redirect targets in menu

@aitken85 says:

When a page has a redirect set, render out that redirect on the front-end in the navigation menus, site tree, etc.

Example:
kb.bunnysites.com/about_us/facebook -> redirects to facebook.com/kb

instead of rendering kb.bunnysites.com/about_us/facebook in the navigation tree, render out facebook.com/kb

Can we remove php_webdriver?

BasicSeleniumTest was the only thing using PHPUnit_Sprout_Selenium2Testcase, which in turn is AFAICT the only thing using the whole php_webdriver dir. That's a lot of dead code.

Navigation groups form error when saving changes

I'm getting this error when trying to save changes from the Manage Menu Groups page form.

Sprout\Exceptions\ConstraintQueryException

/Users/Pearly/Documents/SVN/sprout3/src/sprout/Helpers/Pdb.php [421]:
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (sprout3.sprout_menu_extras, CONSTRAINT sprout_menu_extras_ibfk_1 FOREIGN KEY (image) REFERENCES sprout_files (id) ON UPDATE >CASCADE)
Log ID 348
Stack Trace

/Users/Pearly/Documents/SVN/sprout3/src/sprout/Helpers/Pdb.php [567]:
Sprout\Helpers\Pdb::createQueryException( PDOException )
/Users/Pearly/Documents/SVN/sprout3/src/sprout/Helpers/Pdb.php [440]:
Sprout\Helpers\Pdb::query( 'INSERT INTO ~menu_extras (subsite_id, page_id, image) VALUES (:subsite_id, :page_id, :image)', array(3): >[':subsite_id' => 1, ':page_id' => 2, ':image' => ''], 'count' )
/Users/Pearly/Documents/SVN/sprout3/src/sprout/Helpers/Pdb.php [888]:
Sprout\Helpers\Pdb::q( 'INSERT INTO ~menu_extras (subsite_id, page_id, image) VALUES (:subsite_id, :page_id, :image)', array(3): >[':subsite_id' => 1, ':page_id' => 2, ':image' => ''], 'count' )
/Users/Pearly/Documents/SVN/sprout3/src/sprout/Controllers/Admin/PageAdminController.php [1837]:
Sprout\Helpers\Pdb::insert( 'menu_extras', array(3): ['subsite_id' => 1, 'page_id' => 2, 'image' => ''] )
Sprout\Controllers\Admin\PageAdminController->menuGroupsAction( )
/Users/Pearly/Documents/SVN/sprout3/src/sprout/Controllers/AdminController.php [1944]:
call_user_func_array( array(2): [Sprout\Controllers\Admin\PageAdminController, 'menuGroupsAction'], array(0): [] )
Sprout\Controllers\AdminController->call( 'page', 'menuGroupsAction' )
/Users/Pearly/Documents/SVN/sprout3/src/sprout/core/Kohana.php [266]:
ReflectionMethod->invokeArgs( Sprout\Controllers\AdminController, array(2): ['page', 'menuGroupsAction'] )
/Users/Pearly/Documents/SVN/sprout3/src/sprout/core/Bootstrap.php [103]:
Kohana::instance( )
/Users/Pearly/Documents/SVN/sprout3/src/index.php [117]:
require( '/Users/Pearly/Documents/SVN/sprout3/src/sprout/core/Bootstrap.php' )

Uncaught Exception when removing a column but not its indexes

If you have a table defined in db_struct.xml which has a column which is indexed, and you then delete the XML node for that column, but not the node for the index, doing a DB sync generates an uncaught exception.

Instead, the user should receive a friendly error message, and the sync should continue on its way.

Users expect that updating the page name will update the URL Slug

@KBjana says:

We currently don't update the slug by design because that will break bookmarks etc and sometimes it's different from the name by design. But often this confuses users because they don't realise this fact (or that the field even exists).

A proposed solution would be to update the slug when the page name is updated, keeping a history of the URL and redirecting old pages. If there is a new page with the same URL that would take precedence.

We would then need some solution for checking if the slug is custom or not, ideally without adding extra fields. I'm thinking the URL Slug field it might work with the following:

  • Change the field label to be 'Custom URL Slug'
  • by default it would be blank with placeholder text of the automatically generated slug.
  • If they enter anything in the field it over-rides the text
  • if they delete the field and leave it blank it returns to being automatically generated

Auto lookup handler using JSON config

For autocomplete fields and autofill lists (Fb::autocomplete and Form::autofillList respectively), we need to write a lookup handler each time. The JSON config, however, provides enough detail that a custom lookup handler is really unnecessary. So we just need a generic lookup handler which can read the JSON config, generate a query to look for matches in the appropriate table using the appropriate field(s), and return the matching results as a JSON array.

Initial Configuration attempts fail on SSL-only site

I am attempting to install and evaluate Sprout, but cannot get past the mixed-content problems that Sprout has.
(It's sourcing some content over http and some over https, which gets Firefox and Chrome all irritated)
The database configuration form also submits its data over http (insecure) even though my site is only configured for SSL (and the insecure http auto-forwards to https).
ahhh.
The generated base href is insecure: "<base href=http://sitename.local/"> - that'll break lots of things.

Gack. I can't test it in plain http either - something in the Welcome module is pushing for https - even though it's not configured in nginx.
Finally worked out a way around this.
In the nginx configuration, do /not/ have two separate server blocks (http & https) but a single combined server block.
This is unusual. I'm used to configuring a block for http to redirect to https, and putting all the essential config in the ssl-enabled block. Many other webApps work without issue when configured like this.

Even with this config, the generated base href for the secure site is still http://sitename.whatevs/
That's a definite issue.

My system details:
Debian 10.10
nginx
php 7.3

Store file metadata storage in DB

E.g. image/video dimensions, EXIF data, audio length, bitrate, etc.
Suggest a TEXT column which stores the data in JSON

For instance, video dimensions can be extracted by running ffmpeg -i FILENAME 2>&1 |grep 'Video:' then parsing the single line result

Previews for audio and video files

Currently image uploads (via Fb::fileselector) show a thumbnail, but audio and video get no special treatment. This should change.

The UI could provide a play button which would load an overlay with the actual audio/video with HTML5 controls

Allow admin to indicate crops on images

@Coultsy says:

Add config options to set up sizes of crops needed for gallery thumbs, inner banners and home banners and then create a UI in the media repo which allows an admin to set the visual crop for each of these sizes. This tool should also be available to our small medium and large version of an image as currently managed in file config.

Skin-specific config doesn't load correctly when X-Forwarded-Proto header set

The method Request::protocol looks at the X-Forwarded-Proto header, but doesn't trust it explicitly; instead it looks up the config variable sprout.load_balanced to determine whether to trust this header.

The method Router::originCleanup does a protocol lookup, to determine if a protocol change is required. This method is called prior to subsite selection.

As a result, the sprout config array gets cached before SubsiteSelector::$subsite_code has been set, and therefore skin-specific config file never gets loaded.

Const arrays in JSON forms

(See http://docs.getsproutcms.com/creating-forms-overview/jsonform/fields for referenced examples)

JSON forms support using class member vars which are arrays, e.g.
"items": {"var": "CountryConstants::$alpha3"}

Class constants which are scalar values are also supported, e.g.
"items": {"filter": {"const": "FileConstants::TYPE_IMAGE"}}

Class constants which are arrays (added in PHP 5.6) should also be supported. This could work just like the existing two examples above, e.g.
"items": {"const": "SomeClass::SOME_CONSTANT_ARRAY"}

API documentation needs audit

Many classes and methods are undocumented
All params need documentation and type hints where possible
Return types and Exceptions must be documented

We can use Pelzini to track which classes and methods are missing documentation

Add DO NOT MODIFY header to all config files

Because the inbuilt config files get overwritten by installing a new version of Sprout, any site-specific config should be done not by modifying these files, but instead by creating top-level config files with the same names, perhaps preferably with only the config values which are different from the defaults.

This info should be written up precisely and put into a header in each of the inbuilt config files.

Prevent duplicate file uploads via SHA hashing

An admin operator should be warned when they attempt to upload a duplicate of a file.
N.B. File SHA1 hashes are already being stored.

We could let the file be uploaded and then check the hash once it's on the server, or - better for the user - we could calculate the SHA in JS before the file even starts uploading.
See e.g. https://github.com/emn178/js-sha1

Time picker improvements

  • Some matching would be good, e.g. type '6', get the options [6:00am, 6:30am, 6:00pm, ...]
  • Min and max support would be good if not already available (e.g. 8:00am - 6:00pm for times that are never going to be (far) outside business hours)
  • Support a 'start' time (the UI should immediately scroll to that instead of showing midnight as the first option), because how many times do you actually want to select a time between midnight and 4am?

Store max 1800x1800px image as 'original'

Unless the user ticks a box saying something like "This is for a giant banner and I know what I'm doing"
This should apply on the main file upload form, as well as on the on-the-fly one for fileselectors

Form builder upload improvements

@TheJosh says:

  • Support storing files in protected storage (i.e. they can't be accessed via a public URL like http://server/files/form_submissions/* with no authentication)
  • Do something about images with giant dimensions -- they are probably OK; we just can't show a thumbnail preview because the server will run out of memory if it attempts to do so.

Autofill list: only handle ID values

Currently for each item it submits an array with elements 'id' and 'name'.
Really it ought to just submit the id value, and do a single DB lookup each time the form loads to fetch the already-entered items.

Issues that have been pointed out by @TheJosh:

  • This will perform fairly badly with many items (can be solved with a multi-ajax hack)
  • Adds code complexity (see [1] below)
  • Making the on load ajax delays not create ui issues

[1] Current init code for existing items is:

$.each(data, function() {
    addItem(this);
});

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.