Git Product home page Git Product logo

silverstripe-kapost-bridge's People

Contributors

spekulatius avatar undefinedoffset avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

helpfulrobot

silverstripe-kapost-bridge's Issues

Validation Exceptions not surfacing in Kapost

It looks like for some reason when a validation exception is thrown in the processing of incoming content the message is not returned to Kapost when it should. Kapost is just reporting a internal server error.

Rework Conversion History

Currently each new KapostObject extension must have a new conversion history class, and the primary reasoning for this is to simply send the destination link somewhere else. We could probably re-work this so the conversion history record by default pulls the edit link from the destination object.

Conversion History Notes

We should add support for conversion history notes to the conversion process in general I'm thinking it should work like the following rough notes:

  • Use kapost field name SS_Notes or similar
  • Need to store kapost author avatar on kapost object if not already stored
  • Should appear in conversion dialog floating bouncing icon of author avatar, maybe also somehow include their name?
  • Clicking trigger shows balloon popup width 80%, max height 80% that contains conversion notes with authors name either before or after the notes
  • Maybe use absolute for trigger so it doesn't interfere with other content in conversion dialog

Strip Kapost thread tags from the description field

We should come up with away to strip (if possible) the tag added to the description field when the Kapost content author(s) use the comment feature of the WYSIWYG. It shouldn't be an overly impactful thing if we can't strip it but it would be nice if we could with minimal overhead but good accuracy.

For reference this appears to be what is added to the content, at the very least we should strip the inner span.

<span><span thread="1234567890" class="thread">dolor tortor eget mauris</span></span>

Kapost Service Error Reporting/Logging Gaps

We should allow SS_Log the option to handle errors from the Kapost bridge, currently it looks like phpxmlrpc is trapping the exceptions because of the exception handling level being used thus not allowing them to reach SS_Log or any other error handling. At the very least we should have our module trap the errors and report them accordingly through to Kapost while still allowing SS_Log to function. We should also ensure that we allow extensions to tap into this just in case.

Remove the ability to create a new object when conversion identifies as replacing

We should remove the ability to create a new object during conversion when the system identifies the content as replacing another piece of content. As it currently works if you choose new object during conversion when the system identified it as replacing only the first one encountered will be updating when converting. Which would have been the original one identified as to be replaced.

We should also update the documentation about custom types to also reflect this.

Improve handling of http requests to endpoint

We should improve the handling of http requests to endpoint. Currently hitting the kapost-service endpoint it just returns an XML parsing error in the request. We should instead return a 404 error page.

Link Kapost Objects back to Kapost

Within Kapost ingestion process (model admin), while editing a Kapost Object in Silverstripe, the 'Kapost Reference ID' should be linkable back to the Content in Kapost.

Inbound Content Validation

We should come up with away to do inbound content validation easily in the KapostService class. Either through the built in DataObject::validate() or through a KapostObject::validate_incoming() (for example).

Automatic handling of _kapost_array_ prefixed fields

It looks like when the option "Publish as array" is set for Kapost custom fields the field is a base64 encoded json style array. We should look for and auto process these into a php array, when we find a key that matches we should remove that key and add a key without the _kapost_array_ prefix that has the json decoded array.

Show a record/log of converted Kapost Objects

Within the Kapost ingestion/model admin in SilverStripe there should be a new tab, "Log" that shows previously converted Kapost objects. It should just summarize information about the conversion, fields that may be relevant include:

  • Kapost Author
  • Kapost publish date
  • Title of the object
  • SilverStripe CMS admin/username
  • SilverStripe conversion date
  • A link to the converted SS Page/resource
  • Other?

Also consider a solution (i.e. cron) that routinely cleans out these records (i.e. every 30 days).

New Media Asset Test improvements

We should update the new media asset tests to account for each of the duplicate handling methods. Those methods are smart_rename (default), rename, overwrite, and ignore. Currently it only tests the default.

Kapost Preview

We should implement away to preview content from SilverStripe how will this work? How do we best secure it maybe authentication in the url? See here for more info.

Optional read only for page settings

We should have support making specific items in the settings tab also readonly when using the KapostPageEditControllerExtension that or provide another extension to handle this which is likely the better/only way since the settings tab on pages is actually handled by CMSPageSettingsController.

Incoming Table Refresh

It would be nice to have a button above the table in the model admin for kapost objects that refreshes the table when clicked.

Use the HTML Title and Meta Description for field mapping

Currently Kapost does not send the HTML Title or Meta Description from the SEO section of a content object in the XML-RPC. Kapost has been contacted on this, we'll see what they have to say. But ideally these would map per-bellow. My understanding is that these fields are only served with supported SEO plugins for CMS'es like Wordpress.

Kapost Field SilverStripe
HTML Title Title (if HTML Title is empty it should fall back to the post title)
Meta Description MetaDescription

Incoming change message

We should have the edit page show a message at the top if the page is controlled by Kapost and there are changes waiting. There should be a link that lets you quickly jump to that section of the cms.

Handle page type changes

We should handle when a page type changes from kapost, this would require resetting the class name on the destination page when replacing a page. As well we may need to re-query to update the object.

Warning when searching due to DateTime field

When searching for content the DateTime field is causing a warning to be generated because it's value in the parameters array is itself an array. We'll need to normalize these values somehow or at least account for it before the filters are applied.

Chrome Conversion dialog render bug

Looks like in Chrome a bug in the rendering is causing the title bar to appear much taller than it should, we should consider switching to flex box to address this issue and dump jLayout.

Automatic Conversion

We should have an option to bypass the Kapost section in the cms and straight convert objects. If this setting is enabled we should remove the item from the cms menu to avoid confusion. As well the Kapost publish buttons should drive which status the converted page goes into, grey button (Publish as Draft I believe) should convert to the SilverStripe draft site. Where as the blue button should convert to the live website. This would only effect pages, for regular data objects we should just convert and write them.

We'll need to ensure we have extension points to poke in during and potentially after the conversion process to allow for extensions to adjust the conversion process for stuff like automatically handling relationship setting.

We'll also need in the case of pages to have an optional default parent setting for example maybe a site only uses Kapost for a blog in which case we would want it to assign to the blog holder as a parent.

Support for framework only

Currently the module only supports cms and framework projects. I wonder if it is possible to strip it down to support framework only projects? Technically we could if SiteTree is not present we just don't handle KapostPage and require that extensions handle the response.

Unit Tests

We should write some unit tests using mock Kapost requests and setup TravisCI hooks as well.

Add configuration option for handling assets

We should add a configuration option for handling of assets, currently everytime an asset comes into the system it is downloaded and added to the assets folder/File table. It would be ideal to allow developers to be able to decide how these are handled with 3 options:

Rename (default):

KapostService:
    duplicate_assets: "rename"

Overwrite (should warn in docs about this):

KapostService:
    duplicate_assets: "overwrite"

Ignore (in this case the original should be returned in the response or an error, tbd):

KapostService:
    duplicate_assets: "ignore"

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.