Giovanni Toffoli | 1 Dec 2008 01:53
Favicon

Strange inline validation error in formlib SelectWidget

Hi all,
in a project based on collective.tin, I cannot overcome an annoying problem 
with the "missing_value" option in the formlib SelectWidget.

In several add and edit views, I have Choice fields
- with dynamically generated vocabulary
- whose value is not required
They are added/edited with a SelectWidget that includes a "missing_value" 
option, whose label, in English, is "(no value)".

In all of them, when the user selects the missing_value option, and then 
moves the focus outside, thus causing a "blur" event, the inline validation 
yields an "invalid value" error message, but then s/he can save the form 
without getting further validation error.

I've investigated a little what happens in the modules 
zope/app/form/browser/widget.py and zope/app/form/browser/itemswidgets.py

When the method _toFieldValue of the class SingleDataHelper is executed, in 
module itemswidgets, during inline validation, if the missing_value option 
is selected, it turns out that the value of the "input" argument IS THE 
VALUE OF THE CONTENT OF THE HTML "option" element, that is the "(no value)" 
label, instead of the value of its "value" attribute, that is an empty 
string.
Obviously "(no value)" is not null and is not a value in the vocabulary; 
thus the method convertTokensToValues raises an InvalidValue exception and, 
in turn, _toFieldValue raises a ConversionError.
The "input" argument of _toFieldValue comes from the execution of 
_getFormInput() in the getInputValue method of the SimpleInputWidget class 
in the widget module.
(Continue reading)

Guy Heckman | 1 Dec 2008 06:50
Picon

Re: FancyZoomView and Images in NewsItems

I'm not familiar with FancyZoomView but we implemented lightview  
(primarily for Flash movies), as a bonus I adjusted the newsitem_view  
for kind of the same effect.

Is this when trying to link from another piece of content? If so,  
remember that the news item image is not an object unto itself nor is  
the news item content type "folderish" so you will have to get the  
news item object before for trying to get its image.

This snippet is from our customized News Item view, if it helps.

	<div class="newsImageContainer" tal:condition="here/image_mini| 
nothing">
		<a href="#" id="parent-fieldname-image" class="lightview"  
title="Image Caption Lightview Title"
		      tal:attributes="href string:$here_url/image;
		      title context/getImageCaption;">
			<img tal:replace="structure python: here.tag(scale='mini',  
css_class='newsImage')" src="" alt="" />
		</a>
		<p class="discreet">
			<metal:field use-macro="python:here.widget('imageCaption',  
mode='view')"> Image Caption </metal:field>
		</p>
	</div>

If I am wrong, someone please let me know :-)

On Nov 30, 2008, at 10:27 AM, Espen Moe-Nilssen wrote:

(Continue reading)

rdm19 | 1 Dec 2008 07:29
Picon
Favicon

Plone4ArtistsVideo query on extending ATFile to enable video features


Hello, 

Im using Plone4ArtistsVideo 1.1 for Plone 2.5 with Five 1.4.3. 

I needed a content type with video playable features so I subclassed ATFile
with p4a.video.interfaces.IPossibleVideo interface. I thought it will work
but it didnt although whenever I will edit the content it will show the
normal Plone4ArtistsVideo edit fields but everytime I will hit save it shows
a ('No input', 'file') error. The log error below... 

==================================================================== 
2008-12-01T05:51:35 ERROR Zope.SiteErrorLog
http://localhost:8080/deleteme2/folder-for-videos/Stevie.mpg/atct_edit
Traceback (innermost last): 
  Module ZPublisher.Publish, line 115, in publish 
  Module ZPublisher.mapply, line 88, in mapply 
  Module ZPublisher.Publish, line 41, in call_object 
  Module zope.formlib.form, line 757, in __call__ 
  Module p4a.video.browser.video, line 362, in update 
  Module Products.Five.formlib.formbase, line 54, in update 
  Module zope.formlib.form, line 724, in update 
  Module zope.formlib.form, line 667, in handleSubmit 
  Module zope.formlib.form, line 704, in validate 
  Module zope.formlib.form, line 319, in getWidgetsData 
FormError: ('No input', 'file') 
==================================================================== 

Im also getting this from the log... 

(Continue reading)

Andreas Jung | 1 Dec 2008 07:41

Re: Plone4ArtistsVideo query on extending ATFile to enable video features

As you can see from your logfile (read it carefully!), you're having 
appearently a permission problem on the filesystem...trible check that 
and correct it if necessary.

-aj

On 01.12.2008 7:29 Uhr, rdm19 wrote:
> Hello,
>
> Im using Plone4ArtistsVideo 1.1 for Plone 2.5 with Five 1.4.3.
>
> I needed a content type with video playable features so I subclassed ATFile
> with p4a.video.interfaces.IPossibleVideo interface. I thought it will work
> but it didnt although whenever I will edit the content it will show the
> normal Plone4ArtistsVideo edit fields but everytime I will hit save it shows
> a ('No input', 'file') error. The log error below...
>
> ====================================================================
> 2008-12-01T05:51:35 ERROR Zope.SiteErrorLog
> http://localhost:8080/deleteme2/folder-for-videos/Stevie.mpg/atct_edit
> Traceback (innermost last):
>    Module ZPublisher.Publish, line 115, in publish
>    Module ZPublisher.mapply, line 88, in mapply
>    Module ZPublisher.Publish, line 41, in call_object
>    Module zope.formlib.form, line 757, in __call__
>    Module p4a.video.browser.video, line 362, in update
>    Module Products.Five.formlib.formbase, line 54, in update
>    Module zope.formlib.form, line 724, in update
>    Module zope.formlib.form, line 667, in handleSubmit
>    Module zope.formlib.form, line 704, in validate
(Continue reading)

Mayank Mathur | 1 Dec 2008 08:49
Favicon

displaying user attrib. in Portlet format

hi
Im designing custom portlet, where, i can fetch user attributes.
user attributes r extension of existing attrib. , such as 
DOB,age,etc...,which were entered while registering new user.
Now, in PT, it should check current date with DOB attrib. fetched,and if 
it matches, record will be displayed in Portlet., otherwise, not.

I know i can fetch content/portal-type using 
portal_catalog.searchresults with code sth. like:
   /here.portal_catalog.searchResults(portal_type='<content-type>',
                                                     sort_on='Date',
                                                     sort_order='reverse',

review_state='published')[:5]);"
     tal:condition="python:test(template.getId()!='news' and results, 1, 
0)">

/and displayed it in Portlet body like :

    /<div class="portletBody">
        <tal:newsitems tal:repeat="obj results">
        <dd tal:define="oddrow repeat/obj/odd"
             tal:attributes="class python:test(oddrow, 'portletItem 
even', 'portletItem odd')">

            <a href=""
               tal:attributes="href obj/getURL;
                               title obj/Description">
                <tal:block replace="structure here/document_icon.gif"/>
                <span tal:replace="obj/pretty_title_or_id">
(Continue reading)

Espen Moe-Nilssen | 1 Dec 2008 09:13
Picon
Favicon

Re: contentLeadImage1.1.3 and Maps 1.1

.... found a new product:

redturtle.maps.core


so I did this the other way around (making a news-article "map able""


Den 28. nov. 2008 kl. 20.57 skrev Espen Moe-Nilssen:


I am trying (very hard) to show two views for a "Location".

1) The default
2) One with the LeadImage (similar to NewItem View).

Any suggestins to how I can show the LeadImage in a template?


-- 
Espen Moe-Nilssen
Grieg Medialog AS

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
_______________________________________________
Plone-Users mailing list

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Espen Moe-Nilssen | 1 Dec 2008 09:33
Picon
Favicon

Re: FancyZoomView and Images in NewsItems

Hi and thanks for the feedback.

This gives the same "wrong" result.
The problem is the link (my guess is that the image is not recogniced as an image, but "just an url".

if I change the a href to "a normal image" it works ok.

By the way: here is the url:





Den 1. des. 2008 kl. 06.50 skrev Guy Heckman:

I'm not familiar with FancyZoomView but we implemented lightview (primarily for Flash movies), as a bonus I adjusted the newsitem_view for kind of the same effect.

Is this when trying to link from another piece of content? If so, remember that the news item image is not an object unto itself nor is the news item content type "folderish" so you will have to get the news item object before for trying to get its image.

This snippet is from our customized News Item view, if it helps.

<div class="newsImageContainer" tal:condition="here/image_mini|nothing">
<a href="#" id="parent-fieldname-image" class="lightview" title="Image Caption Lightview Title"
      tal:attributes="href string:$here_url/image;
      title context/getImageCaption;">
<img tal:replace="structure python: here.tag(scale='mini', css_class='newsImage')" src="" alt="" />
</a>
<p class="discreet">
<metal:field use-macro="python:here.widget('imageCaption', mode='view')"> Image Caption </metal:field>
</p>
</div>

If I am wrong, someone please let me know :-)


On Nov 30, 2008, at 10:27 AM, Espen Moe-Nilssen wrote:


I am trying to make a newsitem view that uses FancyZoomView.
If I link to a regular image

/path/to/image.jpg

it works ok,

but If I link to a newsitem image its not working

/link/to/newsitem/image

Any suggestions?

--
Espen Moe-Nilssen
Grieg Medialog AS

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
_______________________________________________
Plone-Users mailing list



Guy Heckman
Systems Design Specialist
Programming & Development
Research, Instruction & Information Technology (RIIT) Group

Smeal College of Business
The Pennsylvania State University
11 Business Building
University Park, PA  16827

Phone: 814-863-9819
Fax: 814-865-1845





-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Yuri | 1 Dec 2008 10:12
Picon

Re: Plone.org homepage - Portlets at the bottom of the page

Andreas Jung ha scritto:
> On 27.11.2008 17:32 Uhr, steven s wrote:
>> Hi
>>
>> Im interested in how the plone homepage was created.
>> In particular the portlets at the bottom and the tabber functionality.
>> I read somewhere that it was a customisation of main template, if this
>> is the case whats the best way of adding the portlets?
>>
>
> Check out
>
> http://pypi.python.org/pypi/collective.portletpage/1.0b2
>
> for bringing portlet into the main content area.

was it better just to change the view of a Page with schemaextender?

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
pepe | 1 Dec 2008 10:34
Picon

Re: plonetruegallery & flickr problems

hi nathan,

so i upgraded to the your new release...but the error is the same as
before.

    2008-12-01 10:11:52 INFO collective.plonetruegallery flickr adapter,
    gallery is <Gallery at gallery.2008-12-01.0802169019>
    Can't find filckr user id
    exceptions.Exception
    _ElementInterface instance has no attribute 'person'

....

Nathan Van Gheem wrote:
> Hey there,
>
>     Should be fixed now.  Just cut a new release for pypi. 0.6b1.4.
>  Let me know if you have anymore issues.
>
>
> Thanks,
> Nathan
>
> On Fri, Nov 28, 2008 at 9:06 AM, pepe <pepe.bz
> <http://pepe.bz> <at> gmx.net <http://gmx.net>> wrote:
>
>     thank you for your disponibility!
>
>     Nathan Van Gheem wrote:
>     > Well, it definitely seems to have stopped working.  This could be a
>     > problem with a lot of things.  My flickr api key, flickr changed its
>     > api, or the library I'm using to communicate with flickr could have
>     > changed.  I'll have to look deeper into it and let you know what I
>     > come up with.
>     >
>     > Thanks for pointing out the issue.
>     >
>     > -Nathan
>     >
>     > On Fri, Nov 28, 2008 at 2:01 AM, pepe <pepe.bz <http://pepe.bz>
>     > <http://pepe.bz> <at> gmx.net <http://gmx.net> <http://gmx.net>> wrote:
>     >
>     >     the version i'm using is the 0.6b1.3 egg.
>     >     my user id is 21960509 <at> N07 and my flickr name is pepe_bz ...
>     yahoo id
>     >     pepebz00
>     >
>     >     thx for your interest!
>     >
>     >     Nathan Van Gheem wrote:
>     >     > Hi, I'm the developer of plone true gallery.  Can you tell
>     me what
>     >     > version you're using and the username of flickr and set your
>     >     trying to
>     >     > access.  I'll see if I can figure anything out.
>     >     >
>     >     >
>     >     > Thanks,
>     >     > Nathan
>     >     >
>     >     > On Thu, Nov 27, 2008 at 7:01 AM, pepe <pepe.bz
>     <http://pepe.bz> <http://pepe.bz>
>     >     > <http://pepe.bz> <at> gmx.net <http://gmx.net> <http://gmx.net>
>     <http://gmx.net>> wrote:
>     >     >
>     >     >     hi,
>     >     >
>     >     >     does anyone of you use collective.plonetruegallery
>     with his
>     >     flickr
>     >     >     account successfully?
>     >     >
>     >     >     it gives me : "Flickr Error: could not validate flickr
>     user."
>     >     >
>     >     >     and the console gives me:
>     >     >
>     >     >     2008-11-27 13:38:49 INFO collective.plonetruegallery
>     flickr
>     >     adapter,
>     >     >     gallery is <Gallery at gallery.2008-11-27.1282708253>
>     >     >     Can't find filckr user id
>     >     >     exceptions.Exception
>     >     >     _ElementInterface instance has no attribute 'person'
>     >     >     2008-11-27 13:38:51 INFO collective.plonetruegallery
>     flickr
>     >     adapter,
>     >     >     gallery is <Gallery at gallery.2008-11-27.1282708253>
>     >     >     Can't find filckr user id
>     >     >     exceptions.Exception
>     >     >     _ElementInterface instance has no attribute 'person'
>     >     >
>     >     >
>     >     >     any help?
>     >     >
>     >     >
>     >    
>     -------------------------------------------------------------------------
>     >     >     This SF.Net email is sponsored by the Moblin Your Move
>     >     Developer's
>     >     >     challenge
>     >     >     Build the coolest Linux based applications with Moblin
>     SDK & win
>     >     >     great prizes
>     >     >     Grand prize is a trip for two to an Open Source event
>     >     anywhere in
>     >     >     the world
>     >     >    
>     http://moblin-contest.org/redirect.php?banner_id=100&url=/
>     <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
>     >     <http://moblin-contest.org/redirect.php?banner_id=100&url=/
>     <http://moblin-contest.org/redirect.php?banner_id=100&url=/>>
>     >     >    
>     <http://moblin-contest.org/redirect.php?banner_id=100&url=/
>     <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
>     >     <http://moblin-contest.org/redirect.php?banner_id=100&url=/
>     <http://moblin-contest.org/redirect.php?banner_id=100&url=/>>>
>     >     >     _______________________________________________
>     >     >     Plone-Users mailing list
>     >     >     Plone-Users@...
>     <mailto:Plone-Users@...>
>     >     <mailto:Plone-Users@...
>     <mailto:Plone-Users@...>>
>     >     >     <mailto:Plone-Users@...
>     <mailto:Plone-Users@...>
>     >     <mailto:Plone-Users@...
>     <mailto:Plone-Users@...>>>
>     >     >     https://lists.sourceforge.net/lists/listinfo/plone-users
>     >     >
>     >     >
>     >
>     >
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Nick Davis | 1 Dec 2008 11:14
Picon
Picon

Re: Fwd: Plone 3 and Zope with own Python 2.5

Alan wrote:
> The application I need to run in our portal is done in python and now it 
> uses some modules that are only available in python2.5.
> 
> Our CMS will still be Plone in the new server and so it will be for a 
> long time, but our applications will likely move to django (we're 
> testing one prototype, but still there's issue). Meanwhile we just 
> wanted a transitory solution or we still have to keep using old version 
> (Plone, python, our application...) until Plone/Zope is available in 
> python 2.5.
> 
> However, my deadline is now December... gosh...
> 
> Alan

This is a somewhat hacky suggestion, but for the applications using 
Django that you want to access from Plone, you could make it look like 
they're part of the Plone site by using the WindowZ plugin -

http://plone.org/products/windowz/

If you de-brand (remove header, footer etc) your applications, you could 
thereby include them in Plone.

Then you could have Plone 3 using its local python 2.4, and the 
Django-based applications could co-exist peacefully on the same box 
using the system python 2.5, with just a bit of loose coupling in the 
form of WindowZ.

Cheers
Nick

--

-- 
Nick Davis
Web Application Developer
University of Leicester
http://www2.le.ac.uk

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Gmane