Pagedown changes upload behaviour

Issue #3 resolved
Eli Bressert
created an issue

When Mezzanine-pagedown (latest dev clone) is installed and used in a Mezzanine project (version 1.3 | Django version 1.4.3) images cannot me uploaded through the admin interface. I was able to reproduce this on two computers by creating a fresh Mezzanine project and initialising Mezzanine-pagedown. When the app is removed from, the uploads work without a problem.


Comments (17)

  1. Ahmad Khayyat repo owner

    I could not reproduce this problem!

    In a new virtualenv, I did the following:

    > pip install mezzanine
    > hg clone
    > pip install ./mezzanine-pagedown/
    > mezzanine-project mezztest

    Then, in, I added mezzanine_pagedown to INSTALLED_APPs, and added the following two lines:

    RICHTEXT_WIDGET_CLASS = 'mezzanine_pagedown.widgets.PageDownWidget'
    RICHTEXT_FILTER = 'mezzanine_pagedown.filters.codehilite'

    Finally, I ran the following in the mezztest directory:

    > python createdb --noinput
    > python runserver

    This resulted in a site that I could upload to in the Media Library section of the site (http://localhost:8000/admin/media-library/browse/).

    Here is the pip freeze -l output for the used virtualenv:


    I managed to upload an image to the existing gallery folder, create a new folder, and upload another image in the new folder, all without any issues.

    Are you getting any messages from the server process or in the browser?

  2. Eli Bressert reporter

    Thanks for the reply. I ran through the steps you did with virtualenv and I could still reproduce the problem. Here's my pip freeze -l output:


    I must admit that it is strange that you cannot reproduce while I can while using virtualenv. I'll try to do the same setup tomorrow on another computer. Will give an update then (I'm on Oz time).

  3. Nate Aune

    I think I'm having the same problem, but it only seems to occur when using django-storages (as that is a requirement for deploying Django apps to Heroku where you want to persist uploaded files).

    I can invoke the same error when going to the Mezzanine media library (

    Request Method: GET
    Request URL:
    Django Version: 1.4.3
    Python Version: 2.7.3
    Installed Applications:
    Installed Middleware:
    File "/app/.heroku/python/lib/python2.7/site-packages/django/core/handlers/" in get_response
      111.                         response = callback(request, *callback_args, **callback_kwargs)
    File "/app/.heroku/python/lib/python2.7/site-packages/django/contrib/admin/views/" in _checklogin
      16.             return view_func(request, *args, **kwargs)
    File "/app/.heroku/python/lib/python2.7/site-packages/django/views/decorators/" in _wrapped_view_func
      89.         response = view_func(request, *args, **kwargs)
    File "/app/.heroku/python/lib/python2.7/site-packages/filebrowser_safe/" in browse
      76.             raise ImproperlyConfigured, _("Error finding Upload-Folder. Maybe it does not exist?")
    Exception Type: ImproperlyConfigured at /admin/media-library/browse/
    Exception Value: Error finding Upload-Folder. Maybe it does not exist?

    This error seems related to this one in the Mezzanine issue tracker:

  4. leonardogentile

    I sometimes happen to have something similar. I open the insert image popup, from there I click on the media library, and without any prediction 1 time over 5 everything get stuck. I mean I can see the media library and the pictures but the mouse selector is stuck in "hand" form and nothing in the page is clickable anymore.
    Sometimes the "select file" image (little arrow pointing down on the left) is not visible. No error at all in the Chrome console or the terminal where python is running.
    Here's my pip freeze -l:

  5. ericboo

    I'm also unable to upload images.

    After selecting an image, nothing seems to happen; the image progress bar doesn't move. This is on localhost.

    If I choose to create a new folder, there's no OK button. Pressing Enter after entering a folder name gives me an entire blank new Content Page.

  6. Ahmad Khayyat repo owner

    Are you guys having upload problems in the main Media library page, or in the Media Library dialog that appears when you click the image button in the pagedown editor?

    Also, given the numerous issues people are having with S3/django-storages and Mezzanine in general, I am only interested in reports using local storage only.

  7. Neum Schmickrath

    I had this same issue, or what I thought was the same. I would click on the image box and it would load the media library window correctly. I would then click on upload and it would have the browse button etc. What I didn't realize was that the upload button was not in the pop-up window. Instead it is at the bottom right of the entire browser window! I didn't see it there until I inspected the elements to see what was going on.

    Great work on this btw. I was using mdown and its lack of media browser integration was killing my style.

  8. Neum Schmickrath

    I spoke too soon. When I click the upload button it has no effect. I don't see an error it just doesn't do anything. Darn, I thought I had a good thing going there. I can click the clear queue button and it works ok but not the upload.

  9. Ahmad Khayyat repo owner

    Right. Upload does not work in the Media Library dialog. We have two options:

    1. Disable the Upload button in the dialog near the top.
    2. Fix the Upload button at the bottom.

    The Upload button at the bottom calls JavaScript that is in the <head> of the Media Library page, but is not loaded in the dialog.

    I am open for ideas/patches. The easy solution is to hide the buttons in the dialog.

  10. Ahmad Khayyat repo owner

    A little more clarification for everyone to follow along..

    When you click either of the Upload or New Folder buttons in the Media Library dialog that the editor opens, the row of buttons at the very end of the page (outside the dialog) is covered by a new one that finishes the new action (New folder or upload), but the new buttons do not work because they call javaScript that is not available.

    The JavaScript they call is in the <head> of their page. I don't know if there is a way to load that head and the script in it; this is the extent of my JavaScript skills. I can make the new bar of buttons appear inside the dialog instead of covering the original page's bar, but we need to make the buttons work first.

  11. Ahmad Khayyat repo owner

    Hide the buttons and filters from the media library popup

    See issue #3. The buttons require scripts that are not available in the popup. The filters append parameters to the original page's url instead of the url the popup is showing.

    → <<cset 7ff7dda666f9>>

  12. Log in to comment