Is there a direct link between published and draft plugins - and if not, why not?

15 views
Skip to first unread message

Philipp Zedler

unread,
Jul 27, 2015, 10:03:44 AM7/27/15
to django-cms...@googlegroups.com, Michael Schmidt
Hallo,

I'm working on a problem that appears when there are ForeinKeys between
one CMSPlugin and another CMSPlugin. Content will be lost when
publishing one of the CMSPlugins. The problem has a bug-ticket here:
https://github.com/divio/django-cms/issues/4143

For the purposes of my current project, the simplest workaround would
use a direct ForeignKey between the draft CMSPlugin and the public
CMSPlugin that was created as a copy of the draft version. (There are
cases where there cannot be such a relation, because the CMSPlugin is
not yet published or deleted in the draft. But that's special cases.)

I cannot find such a ForeignKey/OneToOneField in the existing CMSPlugin
implementation. Is there one?

If not, is there any reason for that, like general good practice for any
CMS, or has just noone considered it necessary up to now?

Best
Philipp

--

Philipp Zedler
Developer für Django und Python
Am langen Rain 12
39031 Bruneck
Italien
++39 / 324 / 77 345 96
http://www.bruneck-berlin.de

Jonas Obrist

unread,
Jul 27, 2015, 11:21:07 AM7/27/15
to django CMS developers, phi...@neue-musik.com, michael.sch...@gmail.com, phi...@neue-musik.com
Hi,

There's a simple reason why CMSPlugin does not have any metadata/relations regarding CMS publisher state: CMSPlugins are not guaranteed to be on a Page. Plugins on 3rd party models (via PlaceholderField) may (or more likely) may not actually have any sort of publishing mechanism. 

Jonas
Reply all
Reply to author
Forward
0 new messages