Populate cover carousel

[Plone 4.3.15]
Hello, I'm trying to customize the front page of my plone site and we have "def populate_cover(site)" to populate the cover (mainly carousel).

def populate_cover(site):
    """Populate site front page. The layout is composed by 4 rows:
    Populate and configure those tiles.
    """
    from cover import set_tile_configuration
    from plone.uuid.interfaces import IUUID

    frontpage = site['front-page']
    # first row
    tiles = frontpage.list_tiles('collective.cover.carousel')
    obj1 = site['institucional']['noticias']['terceira-noticia']
    obj2 = site['institucional']['noticias']['primeira-noticia']
    uuid1 = IUUID(obj1)
    uuid2 = IUUID(obj2)
    data = dict(uuids=[uuid1, uuid2])
    frontpage.set_tile_data(tiles[0], **data)
    set_tile_configuration(frontpage, tiles[0], image={'scale': 'large'})

But always return AttributeError: 'list' object has no attribute 'items' :frowning_face:

Traceback (most recent call last):
  File "/home/pc-lee/Plone/buildout-cache/eggs/plone.subrequest-1.8.4-py2.7.egg/plone/subrequest/__init__.py", line 155, in subrequest
    bind=1
  File "/home/pc-lee/Plone/buildout-cache/eggs/Zope2-2.13.26-py2.7.egg/ZPublisher/mapply.py", line 78, in mapply
    else: return object(*args)
  File "/home/pc-lee/Plone/buildout-cache/eggs/plone.tiles-2.0.0b3-py2.7.egg/plone/tiles/esi.py", line 84, in __call__
    return self.index(*args, **kwargs)
  File "/home/pc-lee/Plone/buildout-cache/eggs/Zope2-2.13.26-py2.7.egg/Products/Five/browser/pagetemplatefile.py", line 125, in __call__
    return self.im_func(im_self, *args, **kw)
  File "/home/pc-lee/Plone/buildout-cache/eggs/Zope2-2.13.26-py2.7.egg/Products/Five/browser/pagetemplatefile.py", line 59, in __call__
    sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
  File "/home/pc-lee/Plone/buildout-cache/eggs/zope.pagetemplate-4.3.0-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 134, in pt_render
    strictinsert=0, sourceAnnotations=sourceAnnotations
  File "/home/pc-lee/Plone/buildout-cache/eggs/zope.pagetemplate-4.3.0-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 260, in __call__
    interpreter()
  File "/home/pc-lee/Plone/buildout-cache/eggs/zope.tal-4.3.0-py2.7.egg/zope/tal/talinterpreter.py", line 272, in __call__
    self.interpret(self.program)
  File "/home/pc-lee/Plone/buildout-cache/eggs/zope.tal-4.3.0-py2.7.egg/zope/tal/talinterpreter.py", line 344, in interpret
    handlers[opcode](self, args)
  File "/home/pc-lee/Plone/buildout-cache/eggs/zope.tal-4.3.0-py2.7.egg/zope/tal/talinterpreter.py", line 587, in do_setLocal_tal
    self.engine.setLocal(name, self.engine.evaluateValue(expr))
  File "/home/pc-lee/Plone/buildout-cache/eggs/zope.tales-3.5.3-py2.7.egg/zope/tales/tales.py", line 696, in evaluate
    return expression(self)
  File "/home/pc-lee/Plone/buildout-cache/eggs/zope.tales-3.5.3-py2.7.egg/zope/tales/expressions.py", line 217, in __call__
    return self._eval(econtext)
  File "/home/pc-lee/Plone/buildout-cache/eggs/Zope2-2.13.26-py2.7.egg/Products/PageTemplates/Expressions.py", line 155, in _eval
    return render(ob, econtext.vars)
  File "/home/pc-lee/Plone/buildout-cache/eggs/Zope2-2.13.26-py2.7.egg/Products/PageTemplates/Expressions.py", line 117, in render
    ob = ob()
  File "/home/pc-lee/Plone/buildout-cache/eggs/collective.cover-1.6b5-py2.7.egg/collective/cover/tiles/list.py", line 142, in is_empty
    return self.results() == []
  File "/home/pc-lee/Plone/buildout-cache/eggs/collective.cover-1.6b5-py2.7.egg/collective/cover/tiles/list.py", line 119, in results
    ordered_uuids = [(k, v) for k, v in uuids.items()]
AttributeError: 'list' object has no attribute 'items'

Could someone help me?

Well, I would not even try to help since I am currently in the process of learning Plone and I am only interested in the last version, however I have learned by your post of the existence of collective.cover - seems interesting product, in the spirit of collaboration I will give half an hour of consideration to your problem on the 4.3.15 installation I have setup as reference.
aw, how nice to look at beautifully written Python code; it is resting my eyes after these days looking at Plone code :slight_smile: )
Whatever, from this very fast eyeballing I'd say that it looks as if the frontpage.set_tile_data should be the culprit, specifically the **data parameter.
in the test code provided, it seems that the parameter should look like
data = dict(title=title, description=description)
cover.set_tile_data(tiles[3], **data) # fourth tile is a Basic one
you wrote:
data = dict(uuids=[uuid1, uuid2])
it may be that the two are somehow equivalent, I don't have the time to dig it more. But it don't look quite the same.
Good luck.

1 Like

Passing *args and **kwargs is a mechanism called argument packing (and unpacking). So if you call a function bla and pass it a dictionary args= {'a':1,'b':2} like bla( **args) this is converted to calling bla(a=1,b=2). * is for positional arguments.

@IolaneAndrade. as @gp54321 spotted you are setting the uuids field of your CarouselTile (which is a subclassed cover ListTile) to a list of uuids, when uuids should be a dictionary. A Python list doesn't have the .items() method, a Python dict does. That's why the rendering of the tile/cover fails after running your populate_cover function. At least I assume your backtrace is generated upon viewing the cover, not after running populate_cover, you're not clear on this.

1 Like

seems to me you're trying to update this code:

please note that was done eons ago with an earlier version of collective.cover; now you have to use the API.

you have to use the populate_with_object() method on the tile; check the tests:

2 Likes

Thanks @gp54321 @fredvd e @hvelarde for the help :slight_smile:

yes @hvelarde, I'm really trying to update this code from https://github.com/interlegis/interlegis.portalmodelo.policy/blob/master/src/interlegis/portalmodelo/policy/setuphandlers.py#L164-L224

Now, I made some modifications to try populate the carousel, but it still isn't work :confused:

Currently the code is:

def populate_cover(site):
"""Populate site front page. The layout is composed by 4 rows:

    1. 1 carousel tile
    2. 1 banner tile
    3. 1 collection tile
    4. 1 parlamientarians tile
    5. 2 embed tiles

Populate and configure those tiles.
"""
# first row
tiles = frontpage.list_tiles('collective.cover.carousel')
obj1 = site['institucional']['noticias']['terceira-noticia']
obj2 = site['institucional']['noticias']['primeira-noticia']
tile = PersistentCoverTile(frontpage, tiles)
tile.populate_with_object(obj1)
tile.populate_with_object(obj2)
site._update_tile_data()
data = dict(header=u'Últimas Notícias', footer=u'Mais notícias…')
frontpage.set_tile_data(tiles[0], **data)
set_tile_configuration(
    frontpage,
    tiles[0],
    image={'scale': 'large'})

But the populate_cover function return this:

Module zope.component._api, line 109, in getMultiAdapter
ComponentLookupError: ((<Cover at /portal-modelo9/front-page>, [u'e461d00606b0472e9fc0369df8ff88f0'], <collective.cover.tiles.base.PersistentCoverTile object at 0x7f21012f6dd0>), , u'')

It's look like that the getMultiAdapter function from zope.component is returning None :confused:
[ the lines mentionades in the image with the error, from the code are:

tile = PersistentCoverTile(frontpage, tiles)
tile.populate_with_object(obj1)

P.S. I'm sorry if my question isn't complex, but I'm beginner in Plone + python :slight_smile:

don't worry: we are here to help you.

I think you (and I) need to understand first what are you trying to accomplish; seems that you are trying to modify the structure of the front page of the site, but you are not doing it the right way.

you can not create a tile like this:

tile = PersistentCoverTile(frontpage, tiles)

because PersistentCoverTile is a base class that is not supposed to be directly used and that's why you are getting that error in the first place.

the layout of the current cover object is in fact in another place; see:

resuming: the registry.xml file stores the layout defined for your project (Portal Modelo) and the cover object layout is already populated with some tiles at creation time (check the XML to see which ones).

if you want to change that layout it would be better to do it on a live site and then export the result into the XML file.

but first, please , and this is not the first time I'm asking, you have to state clearly what do you want to do and why do you want to do it.

Thanks @hvelarde

Actually,
Recently the version of the collective cover used by "Portal Modelo" was updated to 1.6b5 and when I try to add a Plone site, all rows are populated but the Carousel return empty. So I'm trying to find what could be wrong.

let me know how to exactly reproduce the issue and I'll try to help you.

I will try to explain what I made with some steps
First I'll explain how my environment is.

1° Install plone 4.3.15
2º replace the buildout to:
############################################
#
# Buildout Configuration File for Plone
# -------------------------------------
#
# ALWAYS back up all Plone/Zope data and components
# before changing configuration.
#
# Running "bin/buildout" will update your installation,
# installing missing components as necessary.
#
# This will update the add-on products you've added in the eggs= lines.
# This will not, however, upgrade Plone itself (or anything else you've
# pinned with a version specification). To upgrade Plone itself, see the
# comments in "Plone Component Versions".
#
# Tutorial instructions for using zc.buildout for
# configuration management are available at:
# http://plone.org/documentation/tutorial/buildout
# Full details at http://pypi.python.org/pypi/zc.buildout
#
############################################

[buildout]
############################################
# Plone Component Versions
# ------------------------
# This version of the Unified Installer has the components of Plone 4
# preloaded so that it can install without an Internet connection.
# If you want to update, uncomment the "http://..." line below,
# edit it to point to the current version URL, comment out the
# "versions.cfg" line and run "bin/buildout" while attached to the
# Internet. Generally, you only want to do that as part of a planned migration.
# Note that if you are updating components, you should also check the versions
# section at the end of this file, since recipes or components other than
# those of Zope and Plone may need updating at the same time.
#
extends =
    base.cfg
    versions.cfg
#    http://dist.plone.org/release/4.3.15/versions.cfg

# If you change your Plone version, you'll also need to update
# the repository link below.
find-links +=
    http://dist.plone.org/release/4.3.6
index = https://pypi.python.org/simple

# If you try to start Zope as root, it will change user id to run as
# the effective user specified here. This user id must own the var directory
# of your buildout.
effective-user = caroline
# This user will own the rest of the installation, and should be used to
# run buildout.
buildout-user = caroline
# A flag to tell the Unified Installer whether or not to document sudo use.
need-sudo = no

############################################
# Eggs
# ----
# Add an indented line to the eggs section for any Python
# eggs or packages you wish to include in your Plone instance.
#
# Note that versions may be specified here or in the [versions]
# section below. You should always specify versions that you know
# are compatible with the Plone release and at an acceptable
# development level.
#
# If you update to a later version of Plone, remove the hotfix.
#
eggs =
    Plone
    Pillow
    Products.PloneHotfix20150910
    brasil.gov.vcge
    collective.brasil.vocab
    collective.cover
    collective.flowplayer
    collective.plonetruegallery
    collective.polls
    collective.upload
    interlegis.intranetmodelo.departments
    interlegis.intranetmodelo.policy
    interlegis.portalmodelo.api
    interlegis.portalmodelo.buscadores
    interlegis.portalmodelo.ombudsman
    interlegis.portalmodelo.policy
    interlegis.portalmodelo.theme
    interlegis.portalmodelo.transparency
    Products.EasyNewsletter
    Products.PloneFormGen
    Products.PloneLDAP
    Products.windowZ
    sc.embedder
    sc.social.like
    Solgema.fullcalendar
    webcouturier.dropdownmenu


############################################
# ZCML Slugs
# ----------
# Some eggs need ZCML slugs to tell Zope to
# use them. This is increasingly rare.
zcml =
#    plone.reload

############################################
# Development Eggs
# ----------------
# You can use paster to create "development eggs" to
# develop new products/themes. Put these in the src/
# directory.
# You will also need to add the egg names in the
# eggs section above, and may also need to add them
# to the zcml section.
#
# Provide the *paths* to the eggs you are developing here:
develop =
#    src/my.package
    src/interlegis.portalmodelo.policy
    src/interlegis.portalmodelo.pl

############################################
# var Directory
# -------------
# Sets the target directory for the "var" components of the install such as
# database and log files.
#
var-dir=${buildout:directory}/var

############################################
# Backup Directory
# ----------------
# Sets the target directory for the bin/backup and bin/snapshotbackup
# commands. Default is inside this project's var directory, but ideally
# this should be on a separate volume or backup server.
#
backups-dir=${buildout:var-dir}

############################################
# Initial User
# ------------
# This is the user id and password that will be used to create the initial
# user id that will allow you to log in and create a Plone site. This only
# sets the initial password; it will not allow you to change an already
# existing password. If you change the admin password via the web interface,
# the one below will no longer be valid.
# If you find yourself locked out of your Zope/Python installation, you may
# add an emergency user via "bin/plonectl adduser".
user=admin:3vol7oQhQwuh

############################################
# Debug Options
# -------------
# Start Zope/Plone instances in "fg" mode to turn on debug mode;
# this will dramatically slow Plone.
#
# Add-on developers should turn deprecation warnings on
deprecation-warnings = off
# change verbose-security to "on" for useful security errors while developing
verbose-security = off

############################################
# Parts Specification
#--------------------
# Specifies the components that should be included in the buildout.
# Most are defined in the base.cfg extension; you may add your
# own if you need them at the end of this file.
parts =
    instance
    repozo
    backup
    zopepy
    unifiedinstaller

############################################
# Major Parts
# ----------------------
# These common parts make use of sane base settings from
# base.cfg. To customize a part, just add whatever options
# you need. Read base.cfg for common settings.

[instance]
<= instance_base
recipe = plone.recipe.zope2instance
http-address = 8081


############################################
# Versions Specification
# ----------------------
# Version information supplied here will "pin" Python packages to a particular
# version number, even when you use the "newest" flag running buildout.
# Specifying versions for all packages is a good idea and can prevent
# accidental changes when you add new packages to your buildout.
# Note that versions specified here will override those specified earlier
# in the configuration, including those from the Plone and Zope version
# config files.
#
[versions]
buildout.sanitycheck = 1.0.2
Cheetah = 2.2.1
collective.recipe.backup = 2.20
Pillow = 2.6.1
plone.recipe.command = 1.1
plone.recipe.unifiedinstaller = 4.3.2
Products.DocFinderTab = 1.0.5
setuptools = 7.0
zc.buildout = 2.2.5
ZopeSkel = 2.21.2
zopeskel.dexterity = 1.5.4.1
zopeskel.diazotheme = 1.1
Products.PloneHotfix20150910 = 1.0

argh = 0.24.1
bda.cache = 1.1.3
BeautifulSoup = 3.2.1
brasil.gov.vcge = 2.0.0
brasil.vocab = 0.8
cioppino.twothumbs = 1.7
click = 6.2
collective.brasil.vocab = 0.8
collective.classifieds = 1.7
collective.contentrules.mailtogroup = 1.5
collective.cover = 1.6b5
collective.dexteritytextindexer = 2.0.1
collective.elephantvocabulary = 0.2.4
collective.flowplayer = 4.2.1
collective.js.bootstrap = 2.3.1.1
collective.js.colorpicker = 1.0
collective.js.fullcalendar = 1.6.4
collective.js.galleria = 1.2.5
collective.jsonmigrator = 0.3
collective.oembed = 2.0.1
collective.opendata = 1.0a2
collective.polls = 1.7
collective.recipe.backup = 3.0.0
collective.recipe.plonesite = 1.9.2
collective.recipe.supervisor = 0.20
collective.transmogrifier = 1.5.1
collective.upload = 1.0rc1
collective.watcherlist = 1.2
collective.weather = 1.0a4
collective.xmpp.core = 0.3
collective.z3cform.datagridfield = 1.1
collective.z3cform.widgets = 1.0b9
createzopecoverage = 1.5
cssselect = 0.9.1
cssutils = 1.0
dataflake.fakeldap = 1.1
et-xmlfile = 1.0.1
eea.daviz = 10.3
eea.converter = 10.6
ftw.globalstatusmessage = 1.4.0
ftw.upgrade = 1.7.4
gocept.munin = 0.1
hachoir-core = 1.3.3
hachoir-metadata = 1.3.3
hachoir-parser = 1.3.4
html5lib = 1.0b3
i18ndude = 3.4.0
icalendar = 3.8.4
interlegis.intranetmodelo.departments = 1.0b4
interlegis.intranetmodelo.policy = 1.0b7
interlegis.portalmodelo.api = 1.0b4
interlegis.portalmodelo.buscadores = 1.0rc4
interlegis.portalmodelo.migrator = 1.0a1
interlegis.portalmodelo.ombudsman = 1.2
interlegis.portalmodelo.theme = 1.0rc6
interlegis.portalmodelo.transparency = 1.0rc5
interlegis.portalmodelo.pl = 1.0rc7.dev0 
interlegis.portalmodelo.policy = 1.0rc10.dev0
isodate = 0.5.1
jarn.jsi18n = 1.0
jdcal = 1.2
lxml = 3.3.5
Mako = 1.0.3
MarkupSafe = 0.23
meld3 = 1.0.2
munin.zope = 2.1
norecaptcha = 0.3.0
openpyxl = 2.3.1
openxmllib = 1.0.7
pathtools = 0.1.2
plone.api = 1.4.11
plone.app.blocks = 4.1.1
plone.app.drafts = 1.0a2
plone.app.event = 1.1.8
plone.app.ldap = 1.3.2
plone.app.tiles = 3.0.3
plone.app.transmogrifier = 1.4
plone.event = 1.1
plone.formwidget.captcha = 1.0.2
plone.formwidget.datetime = 1.1
plone.formwidget.recaptcha = 2.0a2
plone.formwidget.recurrence = 1.2.5
plone.recipe.command = 1.1
plone.recipe.haproxy = 1.1.2
plonesocial.activitystream = 0.5.6
plonesocial.microblog = 0.5.3
plonesocial.network = 0.6.1
plone.tiles = 2.0.0b3
Products.AROfficeTransforms = 0.11.0
Products.BrFieldsAndWidgets = 1.2.2
Products.DateRecurringIndex = 2.1
Products.EasyNewsletter = 2.6.14
Products.LDAPMultiPlugins = 1.14
Products.LDAPUserFolder = 2.27
Products.OpenXml = 1.1.1
Products.Ploneboard = 3.6
Products.PloneFormGen = 1.7.19
Products.PloneLDAP = 1.2
Products.PrintingMailHost = 0.7
Products.PythonField = 1.1.3
Products.SimpleAttachment = 4.3
Products.SQLAlchemyDA = 0.5.1
Products.TALESField = 1.1.3
Products.TemplateFields = 1.2.5
Products.TinyMCE = 1.4.3
Products.UserAndGroupSelectionWidget = 3.0b5
Products.windowZ = 1.5
Products.ZServerViews = 0.2.0
pyparsing = 1.5.7
python-ldap = 2.4.19
python-memcached = 1.53
python-oembed = 0.2.2
pytz = 2015.2
PyYAML = 3.11
raptus.autocompletewidget = 1.0b3
rdflib = 4.2.1
requests = 2.8.1
rows = 0.1.1
s17.portlets = 1.0b2
s17.taskmanager = 1.0b2
sauna.reload = 0.5.3
sc.blog = 1.0b3
sc.contentrules.group = 1.0b3
sc.contentrules.groupbydate = 2.0.1
sc.contentrules.localrole = 1.0b3
sc.embedder = 1.1b2
sc.galleria.support = 1.0
sc.social.like = 2.4.1
skimpyGimpy = 1.4
Solgema.ContextualContentMenu = 0.2
Solgema.fullcalendar = 2.3.4
SPARQLWrapper = 1.7.6
SQLAlchemy = 0.9.6
StoneageHTML = 0.2.1
stripogram = 1.5
superlance = 0.11
supervisor = 3.2.0
tarjan = 0.1.2
Twisted = 13.2.0
unicodecsv = 0.14.1
watchdog = 0.7.1
webcouturier.dropdownmenu = 2.3.1
wokkel = 0.7.1
xlrd = 0.9.4
xlwt = 1.0.0
z3c.jbot = 0.7.2
z3c.recipe.usercrontab = 1.3
z3c.sqlalchemy = 1.4.0
z3c.unconfigure = 1.1
zope.configuration = 3.8.0
ZopeHealthWatcher = 0.9.0
zope.sqlalchemy = 0.7.5
ZODB = 4.0.0a4

3° replace the versions to:

[buildout]
# This file is part of buildout.coredev repository: https://github.com/plone/buildout.coredev
# The plone release team is responsible for it,
# if you have suggestions, please open an issue at: https://github.com/plone/buildout.coredev/issues
extends = zopetoolkit-1-0-8-zopeapp-versions.cfg
          zope-2-13-26-versions.cfg

[versions]
# Zope overrides
docutils = 0.12
# Get support for @security decorators
AccessControl = 3.0.11
# More memory efficient version, Trac #13101
DateTime = 3.0.3
# DocumentTemplate XSS fix:
DocumentTemplate = 2.13.3
# Products.BTreeFolder2 2.13.4 causes a regression
Products.BTreeFolder2 = 2.13.3
# Override until ztk is updated
coverage = 4.2
Sphinx = 1.1.3
# required for recent z3c.form and chameleon
zope.pagetemplate = 3.6.3
# Required for IE10 fix in orderedSelectionList.pt:
zope.formlib = 4.3.0
# Several tests rely on an old-style pytz release:
pytz = 2013b
Zope2 = 2.13.26
# Zope2 2.13.25 needs three factored out but currently empty packages.
# These may end up in the Zope versions.
Products.TemporaryFolder = 3.0
Products.Sessions = 3.0
ZServer = 3.0

# Build tools
buildout.dumppickedversions = 0.5
collective.recipe.omelette = 0.15
collective.recipe.template = 1.13
collective.xmltestreport = 1.3.3
decorator = 3.4.2
i18ndude = 4.0.1
distribute = 0.6.28
setuptools = 26.1.1
mr.developer = 1.37
plone.recipe.alltests = 1.5
plone.recipe.zeoserver = 1.3.1
plone.recipe.zope2instance = 4.3
z3c.coverage = 1.2.0
z3c.ptcompat = 1.0.1
z3c.template = 1.4.1
zest.releaser = 6.6.2
zope.testrunner = 4.4.4

# Robot Testing
plone.app.robotframework = 1.1.1
robotframework = 3.0
robotframework-debuglibrary = 0.4
robotframework-ride = 1.5.2.1
robotframework-selenium2library = 1.7.4
robotframework-selenium2screenshots = 0.7.0
robotsuite = 1.7.0
selenium = 2.53.5
sphinx-rtd-theme = 0.1.5
sphinxcontrib-robotframework = 0.5.1

# External dependencies
Babel = 1.3
Markdown = 2.0.3
mock = 1.0.1
pep8 = 1.5.7
PIL = 1.1.7
Pillow = 3.3.0
Pygments = 2.0.2
# Unidecode 0.04.{2-9} break tests
Unidecode = 0.04.1
elementtree = 1.2.7-20070827-preview
experimental.cssselect = 0.3
Jinja2 = 2.7.3
feedparser = 5.0.1
future = 0.13.1
importlib = 1.0.3
lxml = 2.3.6
mailinglogger = 3.7.0
nt-svcutils = 2.13.0
ordereddict = 1.1
python-dateutil = 1.5
python-openid = 2.2.5
repoze.xmliter = 0.6
simplejson = 2.5.2
six = 1.10.0
WebOb = 1.4.1

# Python 2.6 dependencies
select-backport = 0.2

# Plone release
Plone                                 = 4.3.15
Products.ATContentTypes               = 2.1.19
Products.ATReferenceBrowserWidget     = 3.0
Products.Archetypes                   = 1.9.17
Products.CMFActionIcons               = 2.1.3
Products.CMFCalendar                  = 2.2.3
Products.CMFCore                      = 2.2.10
Products.CMFDefault                   = 2.2.4
Products.CMFDiffTool                  = 2.2.1
Products.CMFDynamicViewFTI            = 4.1.5
Products.CMFEditions                  = 2.2.23
Products.CMFFormController            = 3.0.8
Products.CMFPlacefulWorkflow          = 1.5.15
Products.CMFPlone                     = 4.3.15
Products.CMFQuickInstallerTool        = 3.0.15
Products.CMFTestCase                  = 0.9.12
Products.CMFTopic                     = 2.2.1
Products.CMFUid                       = 2.2.1
Products.contentmigration             = 2.1.16
Products.DCWorkflow                   = 2.2.5
Products.ExtendedPathIndex            = 3.1.1
Products.ExternalEditor               = 1.1.3
Products.GenericSetup                 = 1.8.8
Products.Marshall                     = 2.1.4
Products.MimetypesRegistry            = 2.0.10
Products.PasswordResetTool            = 2.0.19
Products.PlacelessTranslationService  = 2.0.7
Products.PloneLanguageTool            = 3.2.8
Products.PlonePAS                     = 5.0.14
Products.PloneTestCase                = 0.9.18
Products.PluggableAuthService         = 1.11.0
Products.PluginRegistry               = 1.4
Products.PortalTransforms             = 2.1.12
Products.ResourceRegistries           = 2.2.13
Products.SecureMailHost               = 1.1.2
Products.TinyMCE                      = 1.3.27
Products.ZopeVersionControl           = 1.1.3
Products.ZSQLMethods                  = 2.13.5
Products.i18ntestcase                 = 1.3
Products.statusmessages               = 4.1.2
Products.validation                   = 2.0.2
archetypes.querywidget                = 1.1.3
archetypes.referencebrowserwidget     = 2.5.9
archetypes.schemaextender             = 2.1.7
borg.localrole                        = 3.0.2
collective.monkeypatcher              = 1.1.2
collective.testcaselayer              = 1.6.1
collective.z3cform.datetimewidget     = 1.2.7
diazo                                 = 1.1.3
five.customerize                      = 1.1
five.formlib                          = 1.0.4
five.globalrequest                    = 1.0
five.localsitemanager                 = 2.0.5
plone.app.blob                        = 1.5.19
plone.app.caching                     = 1.1.12
plone.app.collection                  = 1.0.15
plone.app.content                     = 2.1.7
plone.app.contentlisting              = 1.0.5
plone.app.contentmenu                 = 2.0.12
plone.app.contentrules                = 3.0.9
plone.app.controlpanel                = 2.3.11
plone.app.customerize                 = 1.2.3
plone.app.dexterity                   = 2.0.18
plone.app.discussion                  = 2.2.20
plone.app.folder                      = 1.1.2
plone.app.form                        = 2.2.7
plone.app.i18n                        = 2.0.3
plone.app.imaging                     = 1.0.13
plone.app.iterate                     = 2.1.18
plone.app.jquery                      = 1.8.3
plone.app.jquerytools                 = 1.9.2
plone.app.layout                      = 2.3.17
plone.app.linkintegrity               = 1.5.10
plone.app.locales                     = 4.3.13
plone.app.openid                      = 2.0.4
plone.app.portlets                    = 2.5.6
plone.app.querystring                 = 1.2.11
plone.app.redirector                  = 1.2.2
plone.app.registry                    = 1.2.5
plone.app.search                      = 1.1.11
plone.app.testing                     = 4.2.6
plone.app.textfield                   = 1.2.9
plone.app.theming                     = 1.1.8
plone.app.upgrade                     = 1.4.2
plone.app.users                       = 1.2.5
plone.app.uuid                        = 1.1.3
plone.app.viewletmanager              = 2.0.10
plone.app.vocabularies                = 2.1.24
plone.app.workflow                    = 2.1.9
plone.app.z3cform                     = 0.7.7
plone.alterego                        = 1.1.1
plone.autoform                        = 1.6.2
plone.batching                        = 1.0.8
plone.behavior                        = 1.2.0
plone.browserlayer                    = 2.1.7
plone.cachepurging                    = 1.0.13
plone.caching                         = 1.0.1
plone.contentrules                    = 2.0.6
plone.dexterity                       = 2.2.8
plone.fieldsets                       = 2.0.3
plone.folder                          = 1.0.9
plone.formwidget.namedfile            = 1.0.15
plone.i18n                            = 2.0.11
plone.indexer                         = 1.0.4
plone.intelligenttext                 = 2.1.0
plone.keyring                         = 3.0.1
plone.locking                         = 2.0.10
plone.memoize                         = 1.1.2
plone.namedfile                       = 3.0.11
plone.openid                          = 2.0.4
plone.outputfilters                   = 1.15.3
plone.portlet.collection              = 2.1.10
plone.portlet.static                  = 2.0.4
plone.portlets                        = 2.3
plone.protect                         = 2.0.3
plone.registry                        = 1.0.5
plone.reload                          = 2.0.2
plone.resource                        = 1.2.1
plone.resourceeditor                  = 1.0
plone.rfc822                          = 1.1.3
plone.scale                           = 1.4.2
plone.schemaeditor                    = 1.4.1
plone.session                         = 3.5.6
plone.stringinterp                    = 1.0.14
plone.subrequest                      = 1.8.1
plone.supermodel                      = 1.2.7
plone.synchronize                     = 1.0.2
plone.testing                         = 4.1.2
plone.theme                           = 2.1.5
plone.transformchain                  = 1.2.1
plone.uuid                            = 1.0.4
plone.z3cform                         = 0.8.1
plone4.csrffixes                      = 1.1
plonetheme.classic                    = 1.3.3
plonetheme.sunburst                   = 1.4.7
rwproperty                            = 1.0
wicked                                = 1.1.12
z3c.autoinclude                       = 0.3.5
z3c.batching                          = 1.1.0
z3c.blobfile                          = 0.1.5
z3c.caching                           = 2.0a1
z3c.form                              = 3.2.11
z3c.formwidget.query                  = 0.13
z3c.zcmlhook                          = 1.0b1
zope.globalrequest                    = 1.2
zope.schema                           = 4.2.2

# Ecosystem (not officially part of core)
exifread                              = 2.1.2
collective.js.jqueryui                = 1.10.4
five.grok                             = 1.3.2
five.intid                            = 1.0.3
grokcore.annotation                   = 1.3
grokcore.component                    = 2.5
grokcore.formlib                      = 1.9
grokcore.security                     = 1.6.2
grokcore.site                         = 1.6.1
grokcore.view                         = 2.8
grokcore.viewlet                      = 1.11
manuel                                = 1.8.0
martian                               = 0.14
mocker                                = 1.1.1
plone.app.contenttypes                = 1.1.2
plone.app.event                       = 1.1.8
plone.app.intid                       = 1.0.5
plone.app.lockingbehavior             = 1.0.4
plone.app.referenceablebehavior       = 0.7.6
plone.app.relationfield               = 1.2.3
plone.app.stagingbehavior             = 0.1
plone.app.versioningbehavior          = 1.2.0
plone.app.widgets                     = 1.8.0
plone.directives.dexterity            = 1.0.2
plone.directives.form                 = 2.0.3
plone.event                           = 1.3.3
plone.formwidget.autocomplete         = 1.2.11
plone.formwidget.contenttree          = 1.0.15
plone.formwidget.datetime             = 1.3.1
plone.formwidget.recurrence           = 1.2.6
plone.mocktestcase                    = 1.0b3
Products.LinguaPlone                  = 4.2.1
z3c.objpath                           = 1.1
z3c.relationfield                     = 0.6.3
zc.relation                           = 1.0
zope.testbrowser                      = 3.11.1

After that, in src folder:
git clone https://github.com/interlegis/interlegis.portalmodelo.policy
git clone https://github.com/interlegis/interlegis.portalmodelo.pl

After that, in "interlegis.portalmodelo.policy" folder

in registry.xml:
1° remove the comment in line 38;
2° comment line 39

After that, in "interlegis.portalmodelo.policy" folder

in Setuphandlers.py
replace line 240 to:
data = dict(text=RichTextValue(HOME_TILE_TEXT))

After:
bin/buildout
bin/instance fg

access:
http://localhost:8081/

add a new plone site (button --> "Criar um novo Portal Modelo")

With these steps the site will be created but the Carousel Tile will not be populated :confused:

sorry for not answering before; I'm a little bit busy.

I think you're not following the guidelines for development on the Interlegis distribution: you have to use the buildout included in:

please read the whole documentation while I try to give a further looks at your specific problem.

I'm really sorry but it's going to be difficult to help you if no easy way to install the development environment is provided.

I spent already an hour fighting with buildout issues as you're using very old versions of Plone and add-ons.

I got stuck on the download of collective.xmpp.chat and it failed because it depends on distribute, and distribute seems to be unavailable because the download is happening via HTTP instead HTTPS (I already tried the index = https://pypi.python.org/simple/ trick without luck).

I think a new version of collective.xmpp.chat removing that dependency is going to be needed in the short term:

may be @jcbrand can help here.

1 Like

@IolaneAndrade do you still need help on this? I am working in this package (interlegis.portalmodelo.policy).