Repository: django-cms/django-cms

Issue:
Working with AliasPlugin crashes in Django 1.4.x
Fresh djangocms-installer install on Py2.7.5 and Dj1.4.13. Creating an AliasPlugin works fine, but dragging it into a placeholder, or attempting to delete one produces the error below. Testing was performed with a normal TextPlugin and a normal and otherwise-empty, Placeholder.

Also tested in 1.5.8 and 1.6.5 and it seems to work without issue.

```
TypeError at /en/admin/cms/page/copy-plugins/
coercing to Unicode: need string or buffer, __proxy__ found

Request Method: POST
Request URL: http://127.0.0.1:8000/en/admin/cms/page/copy-plugins/
Django Version: 1.4.13
Python Executable: /Users/mkoistinen/.virtualenvs/aliastest/bin/python
Python Version: 2.7.5
Python Path: ['/Users/mkoistinen/Desktop/aliastest', '/Users/mkoistinen/.virtualenvs/aliastest/lib/python27.zip', '/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7', '/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/plat-darwin', '/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/plat-mac', '/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/plat-mac/lib-scriptpackages', '/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/lib-tk', '/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/lib-old', '/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/lib-dynload', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/site-packages']
Server time: Sun, 22 Jun 2014 14:52:47 -0500
Installed Applications:
('djangocms_admin_style',
 'djangocms_text_ckeditor',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.admin',
 'django.contrib.sites',
 'django.contrib.sitemaps',
 'django.contrib.staticfiles',
 'django.contrib.messages',
 'cms',
 'mptt',
 'menus',
 'south',
 'sekizai',
 'djangocms_style',
 'djangocms_column',
 'djangocms_file',
 'djangocms_flash',
 'djangocms_googlemap',
 'djangocms_inherit',
 'djangocms_link',
 'djangocms_picture',
 'djangocms_teaser',
 'djangocms_video',
 'reversion',
 'aliastest')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'cms.middleware.user.CurrentUserMiddleware',
 'cms.middleware.page.CurrentPageMiddleware',
 'cms.middleware.toolbar.ToolbarMiddleware',
 'cms.middleware.language.LanguageCookieMiddleware')

Traceback:
File "/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  109.                         response = callback(request, *callback_args, **callback_kwargs)
File "/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  91.                     response = view_func(request, *args, **kwargs)
File "/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  89.         response = view_func(request, *args, **kwargs)
File "/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner
  196.             return view(request, *args, **kwargs)
File "/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/site-packages/cms/admin/pageadmin.py" in copy_plugins
  1478.             return super(PageAdmin, self).copy_plugins(*args, **kwargs)
File "/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
  25.             return bound_func(*args, **kwargs)
File "/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/site-packages/django/views/decorators/http.py" in inner
  41.             return func(request, *args, **kwargs)
File "/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
  21.                 return func(self, *args2, **kwargs2)
File "/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/site-packages/django/views/decorators/clickjacking.py" in wrapped_view
  41.         resp = view_func(*args, **kwargs)
File "/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/site-packages/django/db/transaction.py" in inner
  224.                 return func(*args, **kwargs)
File "/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/site-packages/cms/admin/placeholderadmin.py" in copy_plugins
  338.                     'position': plugin.position, 'desc': force_unicode(plugin.get_short_description()),
File "/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/site-packages/cms/models/pluginmodel.py" in get_short_description
  137.             return force_unicode(instance)
File "/Users/mkoistinen/.virtualenvs/aliastest/lib/python2.7/site-packages/django/utils/encoding.py" in force_unicode
  71.                 s = unicode(s)

Exception Type: TypeError at /en/admin/cms/page/copy-plugins/
Exception Value: coercing to Unicode: need string or buffer, __proxy__ found
Request information:
GET: No GET data

POST:
target_placeholder_id = u'2'
target_plugin_id = u''
source_language = u'en'
source_plugin_id = u'3'
csrfmiddlewaretoken = u'E17341zB3F9FBSKVHFmk5B9YPHK2BWwH'
source_placeholder_id = u'1'
target_language = u'en'

FILES: No FILES data

COOKIES:
PRUM_EPISODES = 's=1398008551049&r=http%3A//127.0.0.1%3A8000/'
djangocms_nodes_open = 'page_9'
theme = 'inverse'
sessionid = 'd7731c65c4af1a8c533e779ffdcce32a'
csrftoken = 'E17341zB3F9FBSKVHFmk5B9YPHK2BWwH'
django_language = 'en'
__csrf = 'BB2IMkABiVlXXmwh6cec023BGo7JCTUo'

META:
wsgi.version = 
RUN_MAIN = 'true'
HTTP_REFERER = 'http://127.0.0.1:8000/en/?edit'
PROJECT_HOME = '/Users/mkoistinen/Sites'
XDG_DATA_HOME = '/Users/mkoistinen/.local/share'
wsgi.multithread = True
SERVER_PROTOCOL = 'HTTP/1.1'
SERVER_SOFTWARE = 'WSGIServer/0.1 Python/2.7.5'
TERM_PROGRAM_VERSION = '309'
REQUEST_METHOD = 'POST'
LOGNAME = 'mkoistinen'
USER = 'mkoistinen'
HTTP_ORIGIN = 'http://127.0.0.1:8000'
PATH = '/Users/mkoistinen/.virtualenvs/aliastest/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/sw/bin:/sw/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/git/bin:/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/MacGPG2/bin:/Users/mkoistinen/bin'
QUERY_STRING = ''
HOME = '/Users/mkoistinen'
PS1 = '(aliastest)\\h:\\W \\u\\[\\033[0;32m\\]$(parse_git_branch_and_add_brackets) \\[\\033[0m\\]$ '
DISPLAY = '/tmp/launch-Yqk8IS/org.macosforge.xquartz:0'
TERM_PROGRAM = 'Apple_Terminal'
LANG = 'en_US.UTF-8'
INFOPATH = '/sw/share/info:/sw/info:/usr/share/info'
TERM = 'xterm-256color'
SHELL = '/bin/bash'
TZ = 'America/Chicago'
HTTP_COOKIE = 'djangocms_nodes_open=page_9; theme=inverse; __csrf=BB2IMkABiVlXXmwh6cec023BGo7JCTUo; PRUM_EPISODES=s=1398008551049&r=http%3A//127.0.0.1%3A8000/; django_language=en; sessionid=d7731c65c4af1a8c533e779ffdcce32a; csrftoken=E17341zB3F9FBSKVHFmk5B9YPHK2BWwH'
SERVER_NAME = '1.0.0.127.in-addr.arpa'
REMOTE_ADDR = '127.0.0.1'
SHLVL = '1'
SECURITYSESSIONID = '186a9'
HTTP_ACCEPT_LANGUAGE = 'en-US,en;q=0.8,vi;q=0.6,fr;q=0.4'
wsgi.url_scheme = 'http'
XDG_RUNTIME_DIR = '/var/folders/j6/5qscts4d5jj27khq2646mqnc0000gn/C/'
SERVER_PORT = '8000'
_ = './manage.py'
ac_cv_path_INTLTOOL_PERL = '/usr/bin/perl'
CONTENT_LENGTH = '175'
HTTP_ACCEPT = '*/*'
HTTP_DNT = '1'
PATH_INFO = u'/en/admin/cms/page/copy-plugins/'
WORKON_HOME = '/Users/mkoistinen/.virtualenvs'
TERM_SESSION_ID = '28A920C0-FC74-4ACB-9703-40898215E502'
MANPATH = '/sw/share/man:/Library/Frameworks/Python.framework/Versions/2.7/share/man:/opt/local/share/man:/usr/local/mysql/man:/usr/share/man:/usr/local/share/man:/opt/X11/share/man:/usr/local/MacGPG2/share/man:/sw/lib/perl5/5.12.4/man'
HTTP_X_REQUESTED_WITH = 'XMLHttpRequest'
PERL5LIB = '/sw/lib/perl5:/sw/lib/perl5/darwin'
SSH_AUTH_SOCK = '/tmp/launch-EZlRCd/Listeners'
XDG_CACHE_HOME = '/Users/mkoistinen/.cache'
VIRTUAL_ENV = '/Users/mkoistinen/.virtualenvs/aliastest'
XML_CATALOG_FILES = '/sw/etc/xml/catalog'
wsgi.input = <socket._fileobject object at 0x1060924d0>
Apple_PubSub_Socket_Render = '/tmp/launch-USp63k/Render'
HTTP_HOST = '127.0.0.1:8000'
SCRIPT_NAME = u''
XDG_DATA_DIRS = '/sw/share'
HTTP_CONNECTION = 'keep-alive'
TMPDIR = '/var/folders/j6/5qscts4d5jj27khq2646mqnc0000gn/T/'
DEVELOPMENT = 'True'
VIRTUALENVWRAPPER_PROJECT_FILENAME = '.project'
XDG_CONFIG_DIRS = '/sw/etc/xdg'
VIRTUALENVWRAPPER_HOOK_DIR = '/Users/mkoistinen/.virtualenvs'
XDG_CONFIG_HOME = '/Users/mkoistinen/.config'
GATEWAY_INTERFACE = 'CGI/1.1'
wsgi.run_once = False
CSRF_COOKIE = 'E17341zB3F9FBSKVHFmk5B9YPHK2BWwH'
OLDPWD = '/Users/mkoistinen/Desktop/aliastest'
wsgi.multiprocess = False
HTTP_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36'
wsgi.errors = <open file '<stderr>', mode 'w' at 0x10028a1e0>
__CF_USER_TEXT_ENCODING = '0x1F5:0:0'
Apple_Ubiquity_Message = '/tmp/launch-ihXdws/Apple_Ubiquity_Message'
PWD = '/Users/mkoistinen/Desktop/aliastest'
SGML_CATALOG_FILES = '/sw/etc/sgml/catalog'
DJANGO_SETTINGS_MODULE = 'aliastest.settings'
CONTENT_TYPE = 'application/x-www-form-urlencoded; charset=UTF-8'
wsgi.file_wrapper = ''
REMOTE_HOST = ''
HTTP_ACCEPT_ENCODING = 'gzip,deflate,sdch'
COMMAND_MODE = 'unix2003'

Settings:
Using settings module aliastest.settings
USE_L10N = True
USE_THOUSAND_SEPARATOR = False
CSRF_COOKIE_SECURE = False
LANGUAGE_CODE = 'en'
ROOT_URLCONF = 'aliastest.urls'
MANAGERS = 
BASE_DIR = '/Users/mkoistinen/Desktop/aliastest'
DEFAULT_CHARSET = 'utf-8'
STATIC_ROOT = '/Users/mkoistinen/Desktop/aliastest/static'
ALLOWED_HOSTS = []
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
EMAIL_SUBJECT_PREFIX = '[Django] '
SEND_BROKEN_LINK_EMAILS = False
URL_VALIDATOR_USER_AGENT = 'Django/1.4.13 (https://www.djangoproject.com)'
STATICFILES_FINDERS = 
SESSION_COOKIE_DOMAIN = None
SESSION_COOKIE_NAME = 'sessionid'
ADMIN_FOR = 
TIME_INPUT_FORMATS = 
DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'TEST_MIRROR': None, 'NAME': 'project.db', 'TEST_CHARSET': None, 'TIME_ZONE': 'UTC', 'TEST_COLLATION': None, 'PORT': '', 'HOST': 'localhost', 'USER': '', 'TEST_NAME': None, 'PASSWORD': u'********************', 'OPTIONS': {}}}
SERVER_EMAIL = 'root@localhost'
FILE_UPLOAD_HANDLERS = 
DEFAULT_CONTENT_TYPE = 'text/html'
APPEND_SLASH = True
FIRST_DAY_OF_WEEK = 0
DATABASE_ROUTERS = []
YEAR_MONTH_FORMAT = 'F Y'
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
CACHES = {'default': {'LOCATION': '', 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
SESSION_COOKIE_PATH = '/'
USE_X_FORWARDED_HOST = False
CMS_TEMPLATES = 
MIDDLEWARE_CLASSES = 
USE_I18N = True
THOUSAND_SEPARATOR = ','
SECRET_KEY = u'********************'
LANGUAGE_COOKIE_NAME = 'django_language'
DEFAULT_INDEX_TABLESPACE = ''
TRANSACTIONS_MANAGED = False
LOGGING_CONFIG = 'django.utils.log.dictConfig'
TEMPLATE_LOADERS = 
WSGI_APPLICATION = 'aliastest.wsgi.application'
TEMPLATE_DEBUG = True
X_FRAME_OPTIONS = 'SAMEORIGIN'
CSRF_COOKIE_NAME = 'csrftoken'
FORCE_SCRIPT_NAME = None
CACHE_BACKEND = 'locmem://'
SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
SESSION_COOKIE_SECURE = False
CSRF_COOKIE_DOMAIN = None
FILE_CHARSET = 'utf-8'
DEBUG = True
SESSION_FILE_PATH = None
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
INSTALLED_APPS = 
LANGUAGES = 
COMMENTS_ALLOW_PROFANITIES = False
STATICFILES_DIRS = '/Users/mkoistinen/Desktop/aliastest/aliastest/static'
PREPEND_WWW = False
SECURE_PROXY_SSL_HEADER = None
SESSION_COOKIE_HTTPONLY = True
DEBUG_PROPAGATE_EXCEPTIONS = False
MONTH_DAY_FORMAT = 'F j'
LOGIN_URL = '/accounts/login/'
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
TIME_FORMAT = 'P'
DATE_INPUT_FORMATS = 
AUTHENTICATION_BACKENDS = 'django.contrib.auth.backends.ModelBackend'
EMAIL_HOST_PASSWORD = u'********************'
PASSWORD_RESET_TIMEOUT_DAYS = u'********************'
CACHE_MIDDLEWARE_ALIAS = 'default'
SESSION_SAVE_EVERY_REQUEST = False
NUMBER_GROUPING = 0
SESSION_ENGINE = 'django.contrib.sessions.backends.db'
CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
CSRF_COOKIE_PATH = '/'
LOGIN_REDIRECT_URL = '/accounts/profile/'
LOGGING = {'loggers': {'django.request': {'handlers': ['mail_admins'], 'propagate': True, 'level': 'ERROR'}}, 'version': 1, 'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'handlers': {'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'filters': ['require_debug_false'], 'level': 'ERROR'}}}
IGNORABLE_404_URLS = 
LOCALE_PATHS = 
CMS_PLACEHOLDER_CONF = {}
TEMPLATE_STRING_IF_INVALID = ''
DISALLOWED_USER_AGENTS = 
LOGOUT_URL = '/accounts/logout/'
EMAIL_USE_TLS = False
FIXTURE_DIRS = 
EMAIL_HOST = 'localhost'
DATE_FORMAT = 'N j, Y'
MEDIA_ROOT = '/Users/mkoistinen/Desktop/aliastest/media'
DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
ADMINS = 
FORMAT_MODULE_PATH = None
DEFAULT_FROM_EMAIL = 'webmaster@localhost'
MEDIA_URL = '/media/'
DATETIME_FORMAT = 'N j, Y, P'
TEMPLATE_DIRS = '/Users/mkoistinen/Desktop/aliastest/aliastest/templates'
SITE_ID = 1
CMS_PERMISSION = True
ALLOWED_INCLUDE_ROOTS = 
DECIMAL_SEPARATOR = '.'
SHORT_DATE_FORMAT = 'm/d/Y'
CMS_LANGUAGES = {'default': {'hide_untranslated': False, 'redirect_on_fallback': True, 'public': True}, 1: [{'code': 'en', 'redirect_on_fallback': True, 'fallbacks': ['fr'], 'hide_untranslated': False, 'public': True, 'name': 'en'}, {'code': 'fr', 'redirect_on_fallback': True, 'fallbacks': ['en'], 'hide_untranslated': False, 'public': True, 'name': 'fr'}], <class cms.utils.conf.VERIFIED at 0x1022b2600>: True}
TEST_RUNNER = 'django.test.simple.DjangoTestSuiteRunner'
CACHE_MIDDLEWARE_KEY_PREFIX = u'********************'
TIME_ZONE = 'America/Chicago'
FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
DEFAULT_TABLESPACE = ''
TEMPLATE_CONTEXT_PROCESSORS = 
SESSION_COOKIE_AGE = 1209600
SETTINGS_MODULE = 'aliastest.settings'
USE_ETAGS = False
LANGUAGES_BIDI = 
FILE_UPLOAD_TEMP_DIR = None
INTERNAL_IPS = 
STATIC_URL = '/static/'
EMAIL_PORT = 25
FILE_UPLOAD_PERMISSIONS = None
USE_TZ = True
SHORT_DATETIME_FORMAT = 'm/d/Y P'
PASSWORD_HASHERS = u'********************'
ABSOLUTE_URL_OVERRIDES = {}
CACHE_MIDDLEWARE_SECONDS = 600
DATETIME_INPUT_FORMATS = 
EMAIL_HOST_USER = ''
PROFANITIES_LIST = u'********************'

You're seeing this error because you have DEBUG = True in your
Django settings file. Change that to False, and Django will
display a standard 500 page.
```



Discussion:

Resolving patch:
diff --git a/cms/models/aliaspluginmodel.py b/cms/models/aliaspluginmodel.py
--- a/cms/models/aliaspluginmodel.py
+++ b/cms/models/aliaspluginmodel.py
@@ -1,6 +1,7 @@
 # -*- coding: utf-8 -*-
 from cms.models import CMSPlugin, Placeholder
 from cms.utils.compat.dj import python_2_unicode_compatible
+from django.utils.encoding import force_text
 from django.db import models
 
 
@@ -14,6 +15,6 @@ class Meta:
 
     def __str__(self):
         if self.plugin_id:
-            return self.plugin.get_plugin_name()
+            return force_text(self.plugin.get_plugin_name())
         else:
-            return self.alias_placeholder.get_label()
+            return force_text(self.alias_placeholder.get_label())


Test patch:
diff --git a/cms/tests/alias.py b/cms/tests/alias.py
--- a/cms/tests/alias.py
+++ b/cms/tests/alias.py
@@ -1,12 +1,13 @@
 # -*- coding: utf-8 -*-
 from cms import api
+from cms.models import Placeholder
 from cms.test_utils.testcases import CMSTestCase
 from django.core.urlresolvers import reverse
 from django.template import Template, Context
 
 
 class AliasTestCase(CMSTestCase):
-    def test_plugin_alias(self):
+    def test_add_plugin_alias(self):
         page_en = api.create_page("PluginOrderPage", "col_two.html", "en",
                                   slug="page1", published=True, in_navigation=True)
         ph_en = page_en.placeholders.get(slot="col_left")
@@ -17,6 +18,52 @@ def test_plugin_alias(self):
             response = self.client.post(reverse('admin:cms_create_alias'), data={'placeholder_id': ph_en.pk})
             self.assertEqual(response.status_code, 200)
 
+    def test_move_and_delete_plugin_alias(self):
+        '''
+        Test moving the plugin from the clipboard to a placeholder.
+        '''
+        page_en = api.create_page("PluginOrderPage", "col_two.html", "en",
+                                  slug="page1", published=True, in_navigation=True)
+        ph_en = page_en.placeholders.get(slot="col_left")
+        text_plugin_1 = api.add_plugin(ph_en, "TextPlugin", "en", body="I'm the first")
+        with self.login_user_context(self.get_superuser()):
+            #
+            # Copies the placeholder to the clipboard...
+            #
+            self.client.post(reverse('admin:cms_create_alias'), data={'plugin_id': text_plugin_1.pk})
+
+            #
+            # Determine the copied plugins's ID. It should be in the special
+            # 'clipboard' placeholder.
+            #
+            try:
+                clipboard = Placeholder.objects.get(slot='clipboard')
+            except (Placeholder.DoesNotExist, Placeholder.MultipleObjectsReturned):
+                clipboard = 0
+
+            self.assertGreater(clipboard.pk, 0)
+            # The clipboard should only have a single plugin...
+            self.assertEqual(len(clipboard.get_plugins_list()), 1)
+            alias_plugin = clipboard.get_plugins_list()[0]
+
+            #
+            # Test moving it from the clipboard to the page's placeholder...
+            #
+            response = self.client.post(reverse('admin:cms_page_copy_plugins'), data={
+                'source_placeholder_id': clipboard.pk,
+                'source_plugin': alias_plugin.pk,
+                'source_language': 'en',
+                'target_placeholder_id': ph_en.pk,
+                'target_language': 'en',
+                # 'target_plugin_id': 0,
+            })
+            self.assertEqual(response.status_code, 200)
+
+            #
+            # Now, test deleting the copy still on the clipboard...
+            #
+            response = self.client.post(reverse('admin:cms_page_delete_plugin', args=[alias_plugin.pk]), data={})
+            self.assertEqual(response.status_code, 200)
 
     def test_context_menus(self):
         page_en = api.create_page("PluginOrderPage", "col_two.html", "en",