Problem with lost portlets Assignment attributes


I'm using Plone 4.2.4, I have problems with editing portlets. When trying to access the edit view I get an error. The urls to access the edit page all look like this one:

As you can see there's a double slash before "edit?".

Looking into the code I found out that the Assignment object seems broken. Instead of having an Assignment like this one
< object at 0xdd76398>
mine looks like this
<Assignment at >
and their __name__ variable is an empty string, which leads to the wrong generated edit url.

Versions: 2.3.7
plone.portlets 2.1

Any idea on why this is happening and how to get my portlets back?

not enough information to help you here; you must provide the full traceback from the log.

Sorry, I wasn't clear about the error I get. I don't have errors in the log, I just get the 404 error page when I try to edit the portlet.
I assume that I'm getting the error because of the wrong url.

go to the ZMI and, under error_log, remove the entry named NotFound; then you will see the underlying error.

The NotFound exception type is ignored in my error_log. Do you mean "remove it from the ignored list"?

This is the error I get after removing NotFound from the ignore list:

Traceback (innermost last):
  Module ZPublisher.Publish, line 49, in publish
  Module ZPublisher.BaseRequest, line 518, in traverse
  Module ZPublisher.HTTPResponse, line 718, in notFoundError

Site Error

An error was encountered while publishing this resource.

Resource not found

Sorry, the requested resource does not exist.

Check the URL and try again.


Troubleshooting Suggestions

  • The URL may be incorrect.
  • The parameters passed to this resource may be incorrect.
  • A resource that this resource relies on may be encountering an error.

For more detailed information about the error, please refer to the error log.

If the error persists please contact the site maintainer. Thank you for your patience.

that seems to be your problem; try accessing it by removing that spare slash.

why are you getting that link ? can you update to latest Plone version on 4.2 branch?

I can't upgrade Plone right now, because it's on a production server. I can probably try to replicate it locally, In that case I can try the update.

I tried accessing it after removing one slash, but I still get the 404 error.
The wrong url comes from this line of code:

And the cause is the empty __name__ field of the Assignment object.

EDIT: by "I can try to replicate it locally" I mean that I have a local copy which db is very old (~3 years) and don't have this issue in my local plone site, so I'll need to download the production db to try and replicate the error locally.

try upgrading to only; seems somebody fixed that issue there.

@pnicolli did you change the assignment portlet after you once installed it? e.g by adding or removing a field?

@hvelarde: I tried pinning to 2.3.9, I still have the same problem with portlets that were already "corrupted".

@thet: No, the portlets affected are standard portlets (static and navigation) which were not customized.