Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RedirectorSection overly complex and prone to errors #8

Open
hvelarde opened this issue Dec 21, 2017 · 4 comments
Open

RedirectorSection overly complex and prone to errors #8

hvelarde opened this issue Dec 21, 2017 · 4 comments

Comments

@hvelarde
Copy link
Member

I'm trying to migrate a site that has around 150.000 content objects and I don't understand the purpose of this part of the RedirectorSection code:

https://github.com/collective/plone.app.transmogrifier/blob/master/src/plone/app/transmogrifier/redirector.py#L61-L120

resuming, I don't think that it's the right place to do what is trying to do, because the code is really fragile and prone to errors, but maybe I'm wrong.

currently I found the following issues with a real site:

  • items with a None value on relatedItems element fail with AttributeError on line 92 (e.g. u'relatedItems': [u'/clientes/brasil/brasil/educacao/2014/01/dilma-a-educacao-e-o-eixo-do-brasil-que-queremos', None, u'/clientes/brasil/brasil/educacao/2014/01/governo-quer-garantir-acesso-de-todos-a-escolas-de-qualidade'])
  • items with an illegal value on remoteUrl element fail with UnicodeEncodeError on line 102 (e.g. u'remoteUrl': u'Iniciativa dar\u00e1 cr\u00e9dito para fam\u00edlias de baixa renda reformarem im\u00f3vei'")
@hvelarde
Copy link
Member Author

@bsuttor can you elaborate on the need of that part of the code? can we move it to a separate method to be able to make it easier to skip in case of errors?

I'm currently wrapping the whole block on a try/except, but seems to be not very elegant.

@bsuttor
Copy link
Member

bsuttor commented Dec 22, 2017

@hvelarde
I use plone.app.transmogrifier, but I don't think I worked on redirector. Sorry but I'm not sure than I'm the good person to help you on it.

@hvelarde
Copy link
Member Author

@bsuttor sorry, my mistake; in fact is @rpatterson the one I'm looking for :)

@rpatterson
Copy link
Member

I haven't touched this in years and so I don't really have anything to offer here. Sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants