Plone.app.mosaic GSoC)

Hi all, my name is Alexander Nicholson. I am a 3rd year Computer Science major and I am interested in the plone.app.mosaic improvement idea :slight_smile:

I have used Plone before (as an end-user) and have been getting up to speed on the Plone development process (using http://docs.plone.org/develop/index.html). My experience is mostly with Python 2.7.x (and web frameworks like Flask, Django and Bottle). I also have experience with JavaScript and jQuery.

What I've done so far:

  • I am in the Plone GitHub organization.
  • I have buildout working and
  • I have the plone.app.mosaic egg added to my buildout.cfg

I am trying to familiarize myself with using Mosaic. I have been exploring the demo (from https://github.com/plone/plone.app.mosaic/blob/master/README.rst#backend-development) but when I Install the Add-on on a full Plone site and attempt to edit the homepage I get an error:

Here is the trace:

Traceback (innermost last):
Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module plone.z3cform.layout, line 66, in __call__
Module plone.z3cform.layout, line 60, in update
Module z3c.form.form, line 162, in render
Module zope.browserpage.viewpagetemplatefile, line 51, in __call__
Module zope.pagetemplate.pagetemplate, line 132, in pt_render
Module five.pt.engine, line 93, in __call__
Module z3c.pt.pagetemplate, line 163, in render
Module chameleon.zpt.template, line 261, in render
Module chameleon.template, line 171, in render
Module e25e1b0ca36e19c6e905e326663006ff.py, line 91, in render
Module ba049f08d7e2a36be9455e57d76c8f7a.py, line 1806, in render_titlelessform
Module ba049f08d7e2a36be9455e57d76c8f7a.py, line 810, in render_fields
Module ba049f08d7e2a36be9455e57d76c8f7a.py, line 126, in render_widget_rendering
Module ba049f08d7e2a36be9455e57d76c8f7a.py, line 1069, in render_field
Module five.pt.expressions, line 161, in __call__
Module Products.Five.browser.metaconfigure, line 485, in __call__
Module zope.browserpage.viewpagetemplatefile, line 83, in __call__
Module zope.browserpage.viewpagetemplatefile, line 51, in __call__
Module zope.pagetemplate.pagetemplate, line 132, in pt_render
Module five.pt.engine, line 93, in __call__
Module z3c.pt.pagetemplate, line 163, in render
Module chameleon.zpt.template, line 261, in render
Module chameleon.template, line 191, in render
Module chameleon.template, line 171, in render
Module 5fd162a1f0e6b39448a47b8f8255d083.py, line 591, in render
Module 5fd162a1f0e6b39448a47b8f8255d083.py, line 466, in render_widget_wrapper
Module five.pt.expressions, line 161, in __call__
Module plone.app.z3cform.widget, line 90, in render
Module plone.app.mosaic.widget, line 123, in _base_args
Module plone.app.mosaic.widget, line 92, in get_options

KeyError: 'pattern_options'

  - Expression: "widget/@@ploneform-render-widget"
  - Filename:   ... rm-1.2.0-py2.7.egg/plone/app/z3cform/templates/macros.pt
  - Location:   (line 98: col 81)
  - Source:     ... place="structure widget/@@ploneform-render-widget"/>
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Expression: "widget/render"
 - Filename:   ... rm-1.2.0-py2.7.egg/plone/app/z3cform/templates/widget.pt
 - Location:   (line 38: col 46)
 - Source:     ... xt" tal:replace="structure widget/render"
                                          ^^^^^^^^^^^^^
 - Arguments:  repeat: {...} (0)
           context: <LayoutWidget ILayoutAware.content at 0xb18017acL>
           views: <ViewMapper - at 0xb163732cL>
           modules: <TraversableModuleImporter - at 0xb6413c2cL>
           args: <tuple - at 0xb754202cL>
           nothing: <NoneType - at 0x833f204>
           target_language: <NoneType - at 0x833f204>
           default: <object - at 0xb7568a10L>
           request: <instance - at 0xb1054facL>
           wrapped_repeat: {...} (0)
           loop: {...} (0)

The error occurs whether I am in View Document display or in Mosaic Layout display and also when I try to add a Document.

This is on Plone 5.1.0dev0, CMF 2.2.2.10, Zope 2.13.24, PIL 3.1.1

Can anyone offer a suggestion?

Also it would be nice if @datakurre could provide some guidance on how best to get acquainted with the codebase and start contributing!

Thanks

2 Likes

@ANich,
Those errors may be happening because Mosaic requires that you pin specific versions of packages
It's mentioned on this page: https://pypi.python.org/pypi/plone.app.mosaic @datakurre is the man to speak to though.

Hi @ANich, I'm currenty checking, if I can reproduce your issue by following the README, can write another followup later. Meanwhile, please, sign the contributor agreement https://plone.org/foundation/contributors-agreement if you haven't done that already.

1 Like

@ANich I was unable to reproduce your issue. I did a clean checkout of plone.app.mosaic and followed the README. Both, volatile bin/demo example and persistent instance with bin/instance fg worked just fine.

Currently, the easiest way for you to try out and develop Mosaic, is simply using plone.app.mosaic and following the README. Adding Mosaic into existing Plone site requires specific versions for some packages, as written in the README. Usually, you need to have something like

[versions]
plone.tiles = 1.5.0
plone.app.tiles = 2.2.0
plone.app.standardtiles = 1.0b4
plone.app.blocks = 3.0.1
plone.app.drafts = 1.0b3

in your buildout.cfg (or add those version pinnings into existing [versions] part). Unfortunately, currently this gets you quite oudated version of Mosaic. I'm about to roll out new release before the end of March (hopefully sooner than later).

What kind of experience are you looking for from GSOC, Plone and Mosaic? Python? JavaScript? Design?

The easiest part to contribute Mosaic is in polishing the existing tiles (e.g. embed tile should probably have option for raw <iframe/>-tag embed (currently it enforces oembed). These tiles are located in plone.app.standardtiles-package, which (by following the README) gets located at ./extras/plone.app.standardtiles.

Thanks for the replies @pigeonflight @datakurre

Hi @datakurre I have signed the contributor agreement and have been added as a Member.

I noticed my versions.cfg did not have an entry for plone.app.standardtiles. I'm currently trying again on a new site. I will follow up afterwards or when I have new information.

I'm particularly interested in getting some in-depth experience in both Python and JavaScript and learning about the Plone architecture. I'm open to learning about design as well. I'm mostly looking forward to learning how things fit together in such a large system and how the development process works with many developers!

OK I'll start by exploring plone.app.standardtiles and oembed. Thanks.