You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only links from FilerLinkPlugin are migrated to FilerLink2Plugin. Link-instances can be migrated in the same way, but as the fieldnames differ, the links need to be specifically migrated (I only had external_links or internal_links), e.g.:
old_links = Link.objects.all()
for old_link in old_links:
cmsplugin = CMSPlugin.objects.get(id=old_link.cmsplugin_ptr_id)
Link.objects.filter(id=old_link.id).delete()
link = FilerLink2Plugin(cmsplugin_ptr=cmsplugin)
link.__dict__.update(old_link.__dict__)
link.plugin_type = 'FilerLink2Plugin'
if old_link.external_link:
link.url = old_link.external_link
if old_link.internal_link:
link.page_link = old_link.internal_link
link.save()
link.parent.numchild += 1
link.parent.save()
The text was updated successfully, but these errors were encountered:
Only links from
FilerLinkPlugin
are migrated toFilerLink2Plugin
.Link
-instances can be migrated in the same way, but as the fieldnames differ, the links need to be specifically migrated (I only hadexternal_link
s orinternal_link
s), e.g.:The text was updated successfully, but these errors were encountered: