plone logs
general
| Author: | Yu Huang |
|---|---|
| Copyright: | This document has been placed in the public domain. |
- 1 interface
- 1.1 2005-11-22 join link invisiable
- 1.2 2005-11-03 customize logo
- 1.3 2005-11-04 Adding Keywords and Event Types
- 1.4 2008-02-21 enable reference graph for plone item
- 1.5 2008-02-29 install shibboleth on plone
- 1.6 2008-03-05 cache broke
- 1.7 2008-03-05 optional python packages
- 1.8 2006-10-09 edit without visual editor
- 2 A ReStructuredText Primer
- 2.1 2006-08-22 display '(prime) in structured text
- 2.2 reStructured Text
- 2.2.1 2007-10-18 raw directive in reStructured Text
- 2.2.2 2007-10-30 include image.
- 2.2.3 2007-10-30 simple two-column dictionary style table.
- 2.2.4 2008-02-17 structure bullet writing without using definition directive.
- 2.2.5 2008-03-18 csv table
- 2.2.6 2008-03-18 order of titles
- 2.2.7 2008-03-18 set section number
- 3 zope
- 3.1 a few things neglected by zope book(2005-11-05)
- 3.2 install zope on debian(2005-11-22)
- 3.3 upgrade to zope2.7, migrate the plone(check /usr/share/doc/zope2.7/README.Debian.gz 2006-08-13)
- 3.4 2007-11-05 initiate/recover a zope instance
- 3.5 2008-02-24 addon mode
- 3.6 2008-02-24 move zope from dl324b-1 to banyan
- 3.7 2008-07-16 banyan, gutsy upgraded to hardy (8.04)
- 3.8 2008-02-25 enable zeo server and zope with zeo client
- 3.9 2008-02-25 Pack (remove previous revisions of objects)
- 3.10 2008-05-29 webdav
- 4 develop
1 interface
1.1 2005-11-22 join link invisiable
- just make it invisible, not prohibited
- go to the Zope Management Interface, click the portal_registration and uncheck "Visible?"
1.2 2005-11-03 customize logo
- from plone homepage as admin plone_setup-->Zope Management Interface-->portal skins-->plone_images-->logo.jpg(Plone)-->customize
- supplant the Plone image with your own
- Note: If this is the first item added to the custom folder, then you will need to probably need to restart zope. On debian, /etc/init.d/zope restart
- Then it will start to pick up the custom changes.
1.3 2005-11-04 Adding Keywords and Event Types
Almost each content-type has its keyword. Like event has Meeting, Social event, etc.
add to this list by clicking portal_metadata, clicking elements, and then clicking subject in the ZMI. You'll see a vocabulary for events that lists the subjects for that content type.
1.4 2008-02-21 enable reference graph for plone item
reference graph shows the objects that this object refers (childs) and other objects that refer to this object (parents). By default, it's disabled no matter whether graphviz is installed on your system or not.
edit /usr/local/zope2.9/instance/plone-site/Products/Archetypes/config.py and comment out HAS_GRAPHVIZ = False.
1.6 2008-03-05 cache broke
Zope/Plone can't launch due to error following:
File "/usr/lib/zope2.9/lib/python/ZODB/config.py", line 155, in open
read_only_fallback=self.config.read_only_fallback)
File "/usr/lib/zope2.9/lib/python/ZEO/ClientStorage.py", line 314, in __init__
self._cache.open()
File "/usr/lib/zope2.9/lib/python/ZEO/cache.py", line 112, in open
self.fc.scan(self.install)
File "/usr/lib/zope2.9/lib/python/ZEO/cache.py", line 842, in scan
"cache file" % 0, hex(ord(status)))
ValueError: ('unknown status byte value 0 in client cache file', '0x74')
Delete the cache files, *.zec in var/.
1.7 2008-03-05 optional python packages
python-profiler has the profile module used frequently in the test suites of plone products.
python-zodb is probably required if zope's storage server was separated into a zeo instance. i forgot exactly where it's required.
1.8 2006-10-09 edit without visual editor
Pages of plone have several different format. When a new file is created, the default format is html(with visual editor). And only then the button "Edit without visual editor" shows up and if you want to reverse an old html-format file back to reStructured Text or something else, there's no such button available. However, the interface is still there, just append the following after the page URL(or replace the appending 'edit' with following):
atct_edit?kupu.suppress=text
2008-04-08 for bibliography entry, to let the visual editor vanish, append this to URL:
base_edit?kupu.suppress=abstract
2 A ReStructuredText Primer
2.1 2006-08-22 display '(prime) in structured text
use the '::' to enclose the part which contains the prime
2.2 reStructured Text
2.2.1 2007-10-18 raw directive in reStructured Text
it's disabled in plone. don't expect to use .. raw:: latex, etc.
.. contents:: works.
.. topic:: doesn't work
check .txt in http://docutils.sourceforge.net/docs/ref/rst/ as examples. .html are correspondent displaying effects.
2.2.2 2007-10-30 include image.
'scale' is kind of useless. 'width' works. 'target' makes the picture an actual link to that url. the last line/paragraph is the figure legend. it has to be a standalone paragraph starting from beginning. example:
.. figure:: results/genotyping_probes_on_the_array.jpeg :width: 1200 :scale: 50 :alt: genotyping_probes_on_the_array.jpeg :align: right :target: results/genotyping_probes_on_the_array.jpeg genotyping probes on the array
2.2.3 2007-10-30 simple two-column dictionary style table.
the two colons around 'width' are necessary.
:width: :1200: :text :scale: :50: :text :alt: :genotyping_probes_on_the_array.jpeg: :text :align: :right: :text: :target: results/genotyping_probes_on_the_array.jpeg: :text
displayed as
width:
1200: :text scale:
50: :text alt:
genotyping_probes_on_the_array.jpeg: :text align:
right:
text: target: results/genotyping_probes_on_the_array.jpeg: :text
2.2.4 2008-02-17 structure bullet writing without using definition directive.
always indent by multiple of two spaces (multiple of one-space doesn't work).
Below is by definition directive. No empty line in between. chapter 1 would be emphasized.:
chapter 1 section 2This is by multiple of two spaces.:
- chapter 1 - section 2
2.2.5 2008-03-18 csv table
Example:
.. csv-table:: Frozen Delights! :header: "Treat", "Quantity", "Description" :widths: 15, 10, 30 "Albatross", 2.99, "On a stick!" "Crunchy Frog", 1.49, "If we took the bones out, it wouldn't be crunchy, now would it?" "Gannet Ripple", 1.99, "On a stick!"
Displayed as
| Treat | Quantity | Description |
|---|---|---|
| Albatross | 2.99 | On a stick! |
| Crunchy Frog | 1.49 | If we took the bones out, it wouldn't be crunchy, now would it? |
| Gannet Ripple | 1.99 | On a stick! |
2008-07-30 The :file: and :url: directives would render csv-table un-usable.
2.2.6 2008-03-18 order of titles
Reference: http://docutils.sourceforge.net/docs/user/rst/quickstart.html#document-title-subtitle:
================ Document Title ================ ---------- Subtitle ---------- Sub-subtitle ------------ Section Title =============
2.2.7 2008-03-18 set section number
The "sectnum" (or "section-autonumbering") directive automatically numbers sections and subsections in a document.:
.. sectnum::
:depth:3
:prefix:1.
Check http://docutils.sourceforge.net/docs/ref/rst/directives.txt for detail options.
3 zope
3.1 a few things neglected by zope book(2005-11-05)
- '<dtml-call function>' and '<dtml-var function>' are different. The former's return value is ignored.
- Same DTML document, name.html is different from name_html. The latter will recognize '<dtml-var title>'
3.2 install zope on debian(2005-11-22)
- Check /usr/share/doc/zope.
- The admin user asked by debconf when installing ZOPE is an emergency user, not the inituser. Emergency user corresponds to /var/lib/zope/instance/default/access. Emergency user can almost do nothing.(see /usr/share/doc/zope/SECURITY.txt) But it can create a manager(NOT owner) user, which is the actual administrator user.
- Debian ZOPE's http port is 9673(not 8080).
- /usr/share/doc/zope/README.Debian.gz has a short version of how to setup PCGI which allows apache as a frontend http server(instead of ZServer). But /usr/share/doc/zope/examples/apache.conf contains a better one.
- PCGI was deprecated. I'm using RewriteRule and ProxyModule.
3.4 2007-11-05 initiate/recover a zope instance
create a new instance dzhandle -z 2.9 make-instance papaya --addon-mode all
start it by /etc/init.d/zope2.9 restart or /usr/local/zope2.9/instance/papaya/bin/zopectl start, or /usr/local/zope2.9/instance/papaya/bin/runzope. runzope is used to see all debug/error output. (there will be lots of errors, but mostly it'll run through. hoorah python!)
link another zope instance's Products directory to it to test
link another zope instance's Data.fs to var/Data.fs to test
3.5 2008-02-24 addon mode
In debian/ubuntu, when package plone-site is installed (by invoking dzhandle), the addon mode is set to 'manual', which means that the products or extensions will be installed manually through dzhandle while mode 'all' means every product or extension available will be automatically installed, dzhandle instance-addon-mode plone-site tells you the addon-mode of an installed zope instance. Change it by:
dzhandle instance-addon-mode plone-site all
The zope product packages are installed in /usr/share/zope/Products/ in debian/ubuntu. To manually install them:
for p in CacheSetup CMFSquidTool LinguaPlone PageCacheManager PolicyHTTPCacheManager ZMySQLDA ZPsycopgDA ZPsycopgDA:2 ZSQLRelayDA do echo $p; sudo dzhandle add-product plone-site $p done
3.6 2008-02-24 move zope from dl324b-1 to banyan
a few products in /usr/lib/zope2.9/lib/python/Products/ have to be manually moved.
for f in ATBiblioList ATColorPickerWidget ATExtensions ATSchemaEditorNG ImageMag PloneLDAP PloneSurvey mxmCalendarTypes mxmContacts do echo $f sudo scp -r root@dl324b-1.cmb.usc.edu:/usr/lib/zope2.9/lib/python/Products/$f /usr/lib/zope2.9/lib/python/Products/ done
Products unmoved:
- ubuntu has deb packages for these: CMFBibliographyAT/ PythonField/ TemplateFields/ TALESField/
- just don't need them:PloneSVNaccess Quills RPCAuth basesyndication fatsyndication plonetrackback. For Quills, ubuntu has a similar debian package called, zope-coreblog2.
Copy the old Data.fs over
start the zope by /var/lib/zope2.9/instance/plone-site/bin/runzope.
- Go to plone/ZMI page.
- Delete Quills_tool and RPCAuth
- Two things need to be migrated.
- portal_migration, click 'migrate'
- portal_atct, click 'Version Migration'
3.7 2008-07-16 banyan, gutsy upgraded to hardy (8.04)
zope2.9's instance refused to start under /etc/init.d/zope2.9 start, complaining (old/purged). Checking /etc/init.d/zope2.9 turns out that bin/zopectl in the instance directory has been renamed to bin/zopectl.disabled during the upgrade. bin/runzope still works. After renaming it back, it started to kick again.
However, i vaguely remember even sometime right after upgrade, 2008-07-08, error got reported while executing bin/runzope. but now it disappeared, so whatever.
bin/zopectl in dl324b-1's zope2.9 instance was also mysteriously renamed to bin/zopectl.disabled at some point (2006-09-30).
3.8 2008-02-25 enable zeo server and zope with zeo client
- create zeo instance on server by sudo dzhandle -z 2.9 make-zeoinstance zeo_plone (maybe open the monitor-address).
- move the old zope Data.fs to zeo instance's var (like /var/lib/zope2.9/zeo/zeo_plone/var).
- change zope's config file ($instance/etc/zope.conf).
- disable the filestoreage directive of <zodb_db main> enable the zeoclient directive of <zodb_db main>. zeo-client-name (unique local cache files) is optional to setup.
- restart both zeo and zope by /etc/init.d/zope2.9 restart
3.9 2008-02-25 Pack (remove previous revisions of objects)
it's like remove some old history in undo.
go to ZMI -> Control_Panel -> Database Management -> main -> fill in how many days ago and click Pack.
3.10 2008-05-29 webdav
There's webdav support from zope (for plone naturally), http://plone.org/documentation/how-to/webdav.
On linux, there's davfs2 package which support davfs mounting /log/short-unix-commandlines#davfs-for-plone . However as the howto points out, is not a regular network share, it's a view into the source code of your site. Not all file types might work.
problems:
filename on davfs is the title of those pages, not the id (shown in URL).
meta information added to the reStructured text. like:
id: python-logs title: Python Logs excludeFromNav: False subject: description: contributors: creators: yh effectiveDate: None expirationDate: None language: rights: creation_date: 2008/01/14 22:32:15.641 US/Pacific modification_date: 2008/05/29 16:02:40.478 GMT-7 relatedItems: allowDiscussion: None Content-Type: text/x-rst
end of line character is DOS ^M.
after edition on the davfs, gedit reports file can't be saved. vim saved it but the id was changed to the title and after i changed the id to python-logs, plone reported it's missing on the web (found out it's locked by WebDAV).
also tried the webdav lock/unlock (http://localhost:8080/Plone/manage_access) thing mentioned in the howto. doesn't help.
package fusedav doesn't help as well.
Conclusion is no-good, at least not as file system. Maybe some special webdav client would work.
4 develop
4.1 2008-03-19 documentation
Programming Plone - The MySite Tutorial
Users, Authentication, and Permissions
Plone Core Developer Reference
zope3 wiki check its API Documentation.
4.1.1 check source code
Plone's documentation tends to be outdated. Along the source code, there's good .txt files.
- INSTANCE_HOME/Products
- /usr/lib/zope2.10/lib/python/ subdirectory Products contains site-wise products shared among all zope instances. zope/formlib/form.txt explains well about what zope.formlib can do.
4.2 portlets
4.2.1 2005-11-05 portlet_refdb_papers
It's a repurposing of portlet_favorites, used to list recent 5 papers in research.refdb_papers. Following is key difference.
the content type of files in plone is Portal File
use 'python:here.research.refdb_papers.contentValues("Portal File")[:5]' to list the folder's contents
Portal File doesn't have 'getUrl()' or 'getRemoteUrl()' attributes
in left_slots of Properties of plone, it's called 'here/custom/portlet_refdb_papers/macro/portlet', not 'here/portlet_refdb_papers/macro/portlet'.
getURL() is ok. getUrl() is typo
disallow anonymous view: tal:condition="not: isAnon" is used for this purpose
use portal_catalog to get items:
tal:define="favorites python:request.get('items', here.portal_catalog.searchResults(path=folder, sort_on='modified', sort_order='reverse')[:5]);"
4.2.2 2006-11-14 setup portlet_todo
incompatibility after plone upgrade
portlet_review was consulted in the process of making modifications.
- getPhysicalPath() doesn't work anymore
- here.toPortalTime() neither, replaced by here.toLocalizedTime()
- in left_slots of Properties of plone, it's here/portlet_todo/macros/portlet, not here/custom/portlet_todo/macros/portlet
4.3 2008-03-19 add a custom portal tab
add a custom portal tab linking to Trac. help from http://plone.org/documentation/how-to/changing-tabs
go to the ZMI and into the portal_actions tool. Scroll down to the bottom of the page and you will see a form to add a new action.
Here you do the following:
- Enter the Short Name (Trac in this case) in the Id field.
- Type the name you wish to appear in the tab itself into the Title field.
- Type string:http://url.of.trac into the URL (Expression) field. Make sure there are no spaces in what you just typed.
- Type python: member the Condition field. For more conditions, check the how-to link.
- Select View from the Permission field drop down menu. (Quick way to do this - since there are so many entries - is to select the pulldown, and press the V key on your keyboard.)
- Type "portal_tabs" into the Category field.
- Tick the Visible? box.
- Click add at the bottom of the form.
4.4 2008-03-21 debug
- Run zope in debug mode. edit conf/zope.conf and uncomment debug-mode on
- ./bin/zopectl debug. This is different from the debug mode above. It doesn't start the zope daemon. Just open a commandline python console for you to test codes.
- import pdb; pdb.set_trace()
- ./bin/zopectl test -s Products.RichDocument 04/17/08. this -s doesn't work very well. -m is good.
- ./bin/instance test -m Products.RichDocument -D will stop execution at the first failing test and drop into a PDB post-mortem.
- ./bin/zopectl test --help
- 04/17/08 other options (./bin/zopectl test help) don't really work. like --test-path Products/CMFCalendar/, --package-path Products/CMFCalendar/ or --dir Products/ExternalEditor/. maybe i don't really understand them.
4.5 2008-03-30 Variaiton
4.5.1 package to install
paster http://pythonpaste.org/script/
zopeskel http://pypi.python.org/pypi/ZopeSkel A collection of skeletons for quickstarting Zope projects.
collective.lead, wrapper for SqlAlchemy
4.5.2 reference projects
optilux's chapeter 12
borg http://plone.org/documentation/tutorial/borg
http://www.serverzen.net/weblog/topics/zope.formlib, http://plone.org/documentation/tutorial/using-zope-formlib-with-plone
http://plone.org/products/pythonproducts svn co http://codespeak.net/svn/z3/pythonproducts/trunk/ pythonproducts. download links doesn't work anymore.
4.5.3 steps
paster create -t plone2.5_theme Variation
2008-04-14 tried paster create -t plone3_theme Variation.250k. Following questions were prompted:
Enter namespace_package (Namespace package (like plonetheme)) ['plonetheme']: Variation Enter package (The package contained namespace package (like example)) ['example']: 250k Enter skinname (The skin selection to be added to 'portal_skins' (like 'My Theme')) ['']: Enter skinbase (Name of the skin selection from which the new one will be copied) ['Plone Default']: Enter empty_styles (Override default public stylesheets with empty ones?) [True]: Enter include_doc (Include in-line documentation in generated code?) [False]: Enter zope2product (Are you creating a Zope 2 Product?) [True]: Enter version (Version) ['0.1']: Enter description (One-line description of the package) ['An installable theme for Plone 3.0']: Variation 250k web portal Enter long_description (Multi-line description (in reST)) ['']: This is a web portal for the 250k db. Enter author (Author name) ['Plone Collective']: Yu Huang Enter author_email (Author email) ['product-developers@lists.plone.org']: yuhuang@usc.edu Enter keywords (Space-separated keywords/tags) ['web zope plone theme']: SNP polymorphism 250k DB Enter url (URL of homepage) ['http://svn.plone.org/svn/collective/']: http://papaya.usc.edu/ Enter license_name (License name) ['GPL']: Enter zip_safe (True/False: if the package can be distributed as a .zip file) [False]:
namespace_package is the upper level directory of the directory named after package. So in this example, the whole package path is variation.variation.
install pythonproducts (above), only for zope2.9
easy_install Variation
04/17/08. at some point, tag_svn_revision = true setup.cfg in the top paste-generated directory has to be changed to tag_svn_revision = false. otherwise error:
Traceback (most recent call last): File "/usr/bin/easy_install", line 7, in ? sys.exit( File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 1588, in main with_ei_usage(lambda: File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 1577, in with_ei_usage return f() File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 1592, in <lambda> distclass=DistributionWithoutHelpCommands, **kw File "distutils/core.py", line 149, in setup File "distutils/dist.py", line 946, in run_commands File "distutils/dist.py", line 966, in run_command File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 211, in run self.easy_install(spec, not self.no_deps) File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 427, in easy_install return self.install_item(None, spec, tmpdir, deps, True) File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 471, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 655, in install_eggs return self.build_and_install(setup_script, setup_base) File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 930, in build_and_install self.run_setup(setup_script, setup_base, args) File "/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line 919, in run_setup run_setup(setup_script, args) File "/usr/lib/python2.4/site-packages/setuptools/sandbox.py", line 26, in run_setup DirectorySandbox(setup_dir).run( File "/usr/lib/python2.4/site-packages/setuptools/sandbox.py", line 63, in run return func() File "/usr/lib/python2.4/site-packages/setuptools/sandbox.py", line 29, in <lambda> {'__file__':setup_script, '__name__':'__main__'} File "setup.py", line 30, in ? File "distutils/core.py", line 149, in setup File "distutils/dist.py", line 946, in run_commands File "distutils/dist.py", line 965, in run_command File "/usr/lib/python2.4/cmd.py", line 117, in ensure_finalized pass File "/usr/lib/python2.4/site-packages/setuptools/command/bdist_egg.py", line 94, in finalize_options ei_cmd = self.ei_cmd = self.get_finalized_command("egg_info") File "/usr/lib/python2.4/cmd.py", line 319, in get_finalized_command for name in names: File "/usr/lib/python2.4/cmd.py", line 117, in ensure_finalized pass File "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", line 85, in finalize_options self.vtags = self.tags() File "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", line 179, in tags ): version += '-r%s' % self.get_svn_revision() File "/usr/lib/python2.4/site-packages/setuptools/command/egg_info.py", line 224, in get_svn_revision localrev = max([int(d[9]) for d in data if len(d)>9]) ValueError: invalid literal for int()04/18/08 every time, the produce code is changed. Restart zope. Uninstall and install the product again otherwise old code is still in ZODB. No need to remove old objects though. Code automatically updates (sometimes if change is too big. might need to write custom migration code.)
4.5.4 error 1
Error below:
* Module Products.PageTemplates.TALES, line 221, in evaluate
URL: file:CMFPlone/skins/plone_templates/global_defines.pt
Line 3, Column 0
Expression: standard:'context/@@plone'
Names:
{'container': <PloneSite at /Plone>,
'context': <PloneSite at /Plone>,
'default': <Products.PageTemplates.TALES.Default instance at 0xa717520c>,
'here': <PloneSite at /Plone>,
'loop': <Products.PageTemplates.TALES.SafeMapping object at 0xa5a2670c>,
'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0xa711cdec>,
'nothing': None,
'options': {'args': ()},
'repeat': <Products.PageTemplates.TALES.SafeMapping object at 0xa5a2670c>,
'request': <HTTPRequest, URL=http://dl324b-1.cmb.usc.edu:9673/Plone/prefs_install_products_form>,
'root': <Application at >,
'template': <FSPageTemplate at /Plone/prefs_install_products_form>,
'traverse_subpath': [],
'user': <PropertiedUser 'admin'>}
* Module Products.PageTemplates.Expressions, line 185, in __call__
* Module Products.PageTemplates.Expressions, line 173, in _eval
* Module Products.PageTemplates.Expressions, line 127, in _eval
__traceback_info__: context
* Module Products.PageTemplates.Expressions, line 320, in restrictedTraverse
__traceback_info__: {'path': ['@@plone'], 'TraversalRequestNameStack': []}
* Module OFS.ObjectManager, line 728, in __getitem__
KeyError: '@@plone' (Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: '@@plone')
is fixed by: (copied from http://plone.org/products/gsxml/issues/1)
(the egg was laid in your site-packages directory.) Create now a file called inquant.plone.gsxml-configure.zcml in your $INSTANCE_HOME/etc/package-includes with the following line in it:
<include package="inquant.plone.gsxml" file="configure.zcml" />
In your $INSTANCE_HOME/etc folder should also be a file called site.zcml file containing that stuff:
<configure xmlns="http://namespaces.zope.org/zope"
xmlns:meta="http://namespaces.zope.org/meta"
xmlns:five="http://namespaces.zope.org/five">
<include package="Products.Five" />
<meta:redefinePermission from="zope2.Public" to="zope.Public" />
<!-- Load the meta -->
<include files="package-includes/*-meta.zcml" />
<five:loadProducts file="meta.zcml"/>
<!-- Load the configuration -->
<include files="package-includes/*-configure.zcml" />
<five:loadProducts />
<!-- Load the configuration overrides-->
<includeOverrides files="package-includes/*-overrides.zcml" />
<five:loadProductsOverrides />
</configure>
After you added these files, start your instance.
4.5.5 error 2
Error looks like:
failed: Traceback (most recent call last): File "/Applications/Plone-2.5.2/Instance/Products/CMFQuickInstallerTool/QuickInstallerTool.py", line 322, in installProduct File "/usr/lib/zope2.9/lib/python/Products/ExternalMethod/ExternalMethod.py", line 225, in __call__ try: return f(*args, **kw) File "/usr/lib/zope2.9/lib/python/Products/Variation/Extensions/Install.py", line 7, in install setup_tool.runAllImportSteps() File "/Applications/Plone-2.5.2/Instance/Products/GenericSetup/tool.py", line 251, in runAllImportSteps File "/Applications/Plone-2.5.2/Instance/Products/GenericSetup/tool.py", line 725, in _doRunImportStep File "/Applications/Plone-2.5.2/Instance/Products/CMFCore/exportimport/typeinfo.py", line 274, in importTypesTool File "/Applications/Plone-2.5.2/Instance/Products/GenericSetup/utils.py", line 750, in importObjects File "/Applications/Plone-2.5.2/Instance/Products/GenericSetup/utils.py", line 746, in importObjects File "/Applications/Plone-2.5.2/Instance/Products/GenericSetup/utils.py", line 512, in _importBody File "/Applications/Plone-2.5.2/Instance/Products/CMFCore/exportimport/typeinfo.py", line 64, in _importNode File "/Applications/Plone-2.5.2/Instance/Products/GenericSetup/utils.py", line 669, in _initProperties File "/usr/lib/zope2.9/lib/python/OFS/PropertyManager.py", line 210, in _updateProperty raise BadRequest, 'The property %s does not exist' % escape(id) BadRequest: The property i18n_domain does not exist
Fixed by removing i18n:domain related definitions in xml (i.e. profiles/default/types/) files.
4.5.6 2008-04-17 error 3
I installed plone3 thru etch-backport. Mysterious errors like this happened.:
2008-04-15T01:28:33 ERROR Zope.SiteErrorLog http://dl324b-1.cmb.usc.edu:8081/Plone/front-page/atct_edit Traceback (innermost last): Module ZPublisher.Publish, line 119, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 42, in call_object Module Products.CMFFormController.FSControllerPageTemplate, line 90, in __call__ Module Products.CMFFormController.BaseControllerPageTemplate, line 28, in _call Module Products.CMFFormController.ControllerBase, line 231, in getNext Module Products.CMFFormController.Actions.TraverseTo, line 35, in __call__ ValueError: Unable to find update_version_before_edit
Google can't find anything useful. in the end, i reinstalled plone3, made a new instance, make a new plone3 product for variation by paste. The previous old variation product appear as two names in quickinstaller, Products.Variation and Variation. Probably due to co-existence of profiles/ and Extensions/.
4.5.7 2008-04-17 error 4
Installation of Variation messed up the css of Plone and it looked like clumped html page without proper format. It turns out base_properties.props and other dtml files in Variation.SNP250k/Variation/SNP250k/skins/Variation_SNP250k_styles/ added by paste is the cause of that.
4.5.8 2008-04-17 error 5
While running test using zopectl test on this product, got this error:
File "/usr/lib/python2.4/site-packages/Variation.SNP250k-0.1dev_r461-py2.4.egg/Variation/SNP250k/README.txt", line 101, in README.txt
Failed example:
browser.open(portal_url)
Exception raised:
Traceback (most recent call last):
File "/usr/lib/zope2.10/lib/python/zope/testing/doctest.py", line 1348, in __run
compileflags, 1) in test.globs
File "<doctest README.txt[29]>", line 1, in ?
browser.open(portal_url)
File "/usr/lib/zope2.10/lib/python/zope/testbrowser/browser.py", line 224, in open
self.mech_browser.open(url, data)
File "/usr/lib/zope2.10/lib/python/mechanize/_mechanize.py", line 177, in open
return self._mech_open(url, data)
File "/usr/lib/zope2.10/lib/python/mechanize/_mechanize.py", line 202, in _mech_open
response = UserAgent.open(self, self.request, data)
File "/usr/lib/zope2.10/lib/python/mechanize/_opener.py", line 234, in open
response = urlopen(self, req, data)
File "urllib2.py", line 376, in _open
'_open', req)
File "urllib2.py", line 337, in _call_chain
result = func(*args)
File "/usr/lib/zope2.10/lib/python/Products/Five/testbrowser.py", line 64, in http_open
return self.do_open(PublisherConnection, req)
File "urllib2.py", line 993, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/usr/lib/zope2.10/lib/python/zope/testbrowser/testing.py", line 80, in request
self.response = self.caller(request_string, handle_errors)
File "/usr/lib/zope2.10/lib/python/Testing/ZopeTestCase/functional.py", line 38, in wrapped_func
return func(*args, **kw)
File "/usr/lib/zope2.10/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py", line 189, in http
sync()
File "/usr/lib/zope2.10/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py", line 111, in sync
getRootFolder()._p_jar.sync()
AttributeError: 'NoneType' object has no attribute '_p_jar'
Turns out ztc.ZopeDocFileSuite in tests.py has to be replaced by ztc.FunctionalDocFileSuite when browser.open() is invoked in doctest. http://plone.org/documentation/tutorial/testing/functional-tests/view?searchterm=import
4.5.9 2008-04-18 error 6
After i realized the custom phenotype edit form (browser/phenotype.py) is not used because atct_edit is used in alias and immediate_view of profiles/default/types/Phenotype.xml, i removed atct_edit or replaced it with edit as the custom edit form is named as edit in browser/configure.zcml. I got this error:
ERROR Zope.SiteErrorLog http://nohost/plone/variation3/createObject Traceback (innermost last): Module ZPublisher.Publish, line 119, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 42, in call_object Module Products.CMFFormController.FSControllerPythonScript, line 104, in __call__ Module Products.CMFFormController.Script, line 145, in __call__ Module Products.CMFCore.FSPythonScript, line 140, in __call__ Module Shared.DC.Scripts.Bindings, line 313, in __call__ Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec Module Products.CMFCore.FSPythonScript, line 196, in _exec Module None, line 18, in createObject - <FSControllerPythonScript at /plone/createObject used for /plone/variation3> - Line 18 Unauthorized: You are not allowed to access 'getActionObject' in this context
It's not the permission problem. Changing the permission to View or zope2.view doesn't help. After i renamed the custom edit form to pheno_edit in browser/configure.zcml and change accordingly in profiles/default/types/Phenotype.xml.:
<property name="immediate_view">edit</property>
<alias from="edit" to="pheno_edit"/>
<alias from="sharing" to="@@sharing"/>
<action title="View" action_id="view" category="object" condition_expr=""
url_expr="string:${object_url}/view" visible="True">
<permission value="View"/>
</action>
<action title="Edit" action_id="edit" category="object" condition_expr=""
url_expr="string:${object_url}/edit" visible="True">
<permission value="Modify portal content"/>
4.5.10 2008-04-13 test plone3 on debian etch
http://plone.org/documentation/how-to/plone-on-debian-etch provides instructions of how to get plone3 installed on etch thru etch-backports.
install plone3:
apt-get install -t etch-backports plone3-site
4.5.11 2008-04-17 zopectl test on this product
as the product is installed by easy_install into /usr/lib/python2.4/site-packages/, the directory has to be added to zopectl test:
./bin/zopectl test --path /usr/lib/python2.4/site-packages/Variation.SNP250k-0.1dev_r461-py2.4.egg/ -m Variation.SNP250k
Or if tag_svn_revision = false in setup.cfg:
./bin/zopectl test --path /usr/lib/python2.4/site-packages/Variation.SNP250k-0.1dev-py2.4.egg/ -m Variation.SNP250k