django-blog-zinnia / cmsplugin-zinnia

Bridge between django-blog-zinnia and django-cms
BSD 3-Clause "New" or "Revised" License
53 stars 46 forks source link

menu entries fail to load / URL Namespace failures #29

Closed techdragon closed 10 years ago

techdragon commented 10 years ago

I have just got the app installed no settings changed yet and i get this set of errors.

    Menu CategoryMenu cannot be loaded. Please, make sure all its urls exist and can be resolved.
    Menu TagMenu cannot be loaded. Please, make sure all its urls exist and can be resolved.
    Menu AuthorMenu cannot be loaded. Please, make sure all its urls exist and can be resolved.

these show up in the top of the django-cms menu/sidebar thing.

Are the defaults as documented or is the issue at my end?

Fantomas42 commented 10 years ago

Hello,

which versions of the cms, the pluggin and zinnia do you use ?

Regards

galeo commented 10 years ago

The same problem occurred, I use the latest released django-cms 3.0, zinnia 0.14.1 and cms zinnia pluggin 0.5.1.

So, I think just have to wait for the compatibility support for django-cms 3.0.

Thanks

techdragon commented 10 years ago

the issue is actually related to a pretty broad problem in zinnia with regard to url namespaces.

the menu entry failures are due to reverseurl lookup failures when the code tries to run and register the menu entries, I was able to fix this by editing the named url lookups to remove the zinnia prefix, but I'm not sure thats the best way to do it.

More broadly, if you install out of the box Django 1.6.2 + Django-CMS 3.0 + Zinnia from github + cmsplugin-zinnia from github. Setup with everything Zinnia related as defaults, ( I've also set zinnia up for using the extended entry model that lets me add djangocms plugins inside a zinnia entry, but its 100% vanilla other than that option. ) seems to fail to correctly register the zinnia url namespace, and consequently there are broken zinnia related parts all over the place. Not sure quite where the issue springs from since i haven't worked out a solution but i suspect its something to do with django-cms app hooks or plugin loading since thats how zinnia is being loaded.

My commit here shows what fixes the menu loading errors, but I'm quite sure its just symptomatic of the broader namespace issue. https://github.com/techdragon/cmsplugin-zinnia/commit/02c29b7c6e987f1c52315bec6ef89777ac3c061f

Fantomas42 commented 10 years ago

@galeo If you use cmsplugin_zinnia v0.5.1 it's cannot work, you must use the unreleased (yet) version of cmsplugin-zinnia. I will do the release during the week.

@techdragon Effectively if you use the unreleased v0.14.2 if Zinnia which introduce namespace, you can experience issues with the app-hook. Please read this link:

https://github.com/Fantomas42/cmsplugin-zinnia#tips-for-using-the-apphook

techdragon commented 10 years ago

@Fantomas42 can you possibly clarify or provide an example of what you mean by this statement in the docs regarding the app hook? I'm not sure if I should submit a pull request or not for something that may be explicitly setting something in the plugin that your trying to explain we should configure ourselves. "You have to set the application instance name field to zinnia, otherwise the URLs provided by Zinnia will not be resolved."

Fantomas42 commented 10 years ago

@techdragon

Normally when you want to use the app-hook provided by the plugin, to make it functionnal you have fill the field under the app-hook field in the admin interface with the value 'zinnia' if you are using the development version of Zinnia (v0.14.2.dev).

Now this behavior was for the release 3.0.c1 of the CMS, now with the final release a more global issues is happening the develop version of Zinnia and the namespace resolution.

For the moment, I can only suggest to use the latest stable release of Zinnia v0.14.1 to avoid the issue.

Fantomas42 commented 10 years ago

Note: I have just published cmsplugin-zinnia v0.6 on Pypi.

Which is compatible with django-cms 3.0 and zinnia v0.14.1

Fantomas42 commented 10 years ago

I have said nothing about the namespace compatibility in Zinnia v0.14.2.dev with cms 3.0, everything works fine on this point. I have just used the wrong version of Zinnia during my tests.

rakeshgohel01 commented 9 years ago

I am still facing this issue with

django-cms==3.0 cmsplugin-zinnia==0.6 django-blog-zinnia==0.14.1

Errors: Menu EntryMenu cannot be loaded. Please make sure all its urls exist and can be resolved. Menu CategoryMenu cannot be loaded. Please make sure all its urls exist and can be resolved. Menu TagMenu cannot be loaded. Please make sure all its urls exist and can be resolved. Menu AuthoMenu cannot be loaded. Please, makse sure all its urls exist and can be resolved.

I have duly followed the instruction adding application instance as "zinnia" in Advanced settings and below changes

class ZinniaApphook(CMSApp): """ Zinnia's Apphook """ name = _('zinnia') urls = APP_URLS menus = app_menus app_name = 'zinnia' --> added

Whenever I access the project, an error popup is displayed.

Fantomas42 commented 9 years ago

@mocha384 give a try with the development version of Zinnia.

rakeshgohel01 commented 9 years ago

@Fantomas42 The dev version works well and now there are no more errors related to Menus. Though I had couple of other errors while enabling dev version. At the end, it's good. Thank you for replying on time.

ryanbagwell commented 9 years ago

@mocha384 after installing the dev version, I ran into field name conflicts. Did you run into this to? And if so, how did you resolve the issue?

ryanbagwell commented 9 years ago

Figured out my problem. I needed to use "django_comments" instead of "django.contrib.comments"