On 21/06/2017 8:18 PM, Melvyn Sopacua wrote:
On Wednesday 21 June 2017 14:48:52 Mike Dewhirst wrote:
On 21/06/2017 11:48 AM, Ryne Everett wrote:
Tinymce comes bundled with the project. Once you log into the admin
a
lot of content becomes inline-editable if that's what you're after.
Ryne

Yes it is. I installed Django 1.10.7 and Mezzanine 4.2.3 in a
virtualenv, adopted the identical database (Postgres 9.3) previously
used by Mezzanine 3.?, migrated the tables and pointed Gunicorn to the
new wsgi file.

It all worked splendidly except the page contents in the Admin had no
tinymce controls and the field contents are plain text with html
markup everywhere.
Your first order of business is to determine where the problem is:
- Is the js/css for tinymce inserted into the HTML? (backend issue)
Yes - see <head> section below for an admin page
- Are there js errors generated because it's not found or ordering
problems or ... ? (frontend issue)
Can't see anything in the supervisord log. No files in /var/log/gunicorn. Nothing of interest in the nginx log.

What you're looking for in the source is:
<link href="/static/mezzanine/tinymce/tinymce.css" type="text/css"
media="all" rel="stylesheet" />
<script type="text/javascript"
src="/static/mezzanine/tinymce/tinymce.min.js"></script>
<script type="text/javascript"
src="/static/mezzanine/tinymce/jquery.tinymce.min.js"></script>
<script type="text/javascript"
src="/static/mezzanine/js/tinymce_setup.js"></script>

I have checked to see they all exist in ~/mike/envs/m4d10p2/mezpq5/static/...

I also took the following static dirs out-of-play by prefixing them with 'x' so the ones in site-packages/mezzanine/core/static would be used. I'm guessing they all ended up there because I ran collectstatic a day or so ago.

xadmin
xcss
xfilebrowser
xfonts
xgrappelli
xjs
xmezzanine

The virtualenv is active. gunicorn and nginx have both been restarted. The public side of the site is working. Admin is working excpt for needing to hand-edit html.

Here is the <head> to </head> section (verbatim) from an admin page (wonder why it isn't html5?) ...


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; lang="en" xml:lang="en" >
<head>
<title>Change Rich text page | Mezzanine</title>
<meta name="robots" content="NONE,NOARCHIVE" />

<!-- LOADING -->


<!-- STYLESHEETS / EXTRASTYLE -->


<link rel="stylesheet" type="text/css" href="/static/grappelli/css/base.css" />

<link rel="stylesheet" href="/static/mezzanine/css/admin/global.css">
<style>
/* These are set in PageAdmin's view methods, and mezzanine.utils.admin.SingletonAdmin */



</style>




<!-- JAVASCRIPTS / EXTRAHEAD -->


<script>





    window.__home_link = '<a href="/">View site</a>';
window.__csrf_token = 'oH3MgFIrkDtzbDM3z1QtbhthlD3O88NTN3B8j9gW71fi1vRoNIEfh4NP7F7PqJEl';
    window.__admin_keywords_submit_url = '/admin/admin_keywords_submit/';
    window.__filebrowser_url = '/admin/media-library/browse/';
    window.__link_list_url = '/admin/displayable_links.js';
    window.__tinymce_css = '/static/mezzanine/css/tinymce.css';
    window.__admin_url = '/admin/';
    window.__static_proxy = '/admin/asset_proxy/';
    window.__admin_media_prefix__ = '/static/admin/';
    window.__grappelli_installed = true;
    window.__admin_menu_collapsed = false;
    window.__language_code = 'en';
</script>


<script type="text/javascript" src="/static/mezzanine/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
    // Ensures jQuery does not pollute the global namespace
    $.noConflict();

    var ADMIN_URL = "/admin/";
</script>

<script>
jQuery(function($) {
    $('.admin-title').click(function() {location = window.__admin_url;});
// This line can be removed after a decent amount of time has passed since // https://github.com/stephenmcd/grappelli-safe/pull/56/files occurring.
$("#id_sitepermissions-__prefix__-sites").parent().parent().parent().remove();
});
</script>


    <script src="/admin/jsi18n/"></script>
<link href="/static/mezzanine/tinymce/tinymce.css" type="text/css" media="all" rel="stylesheet" />
<script type="text/javascript" src="/static/admin/js/core.js"></script>
<script type="text/javascript" src="/static/admin/js/vendor/jquery/jquery.js"></script> <script type="text/javascript" src="/static/admin/js/jquery.init.js"></script> <script type="text/javascript" src="/static/admin/js/admin/RelatedObjectLookups.js"></script>
<script type="text/javascript" src="/static/admin/js/actions.js"></script>
<script type="text/javascript" src="/static/admin/js/urlify.js"></script>
<script type="text/javascript" src="/static/admin/js/prepopulate.js"></script> <script type="text/javascript" src="/static/admin/js/vendor/xregexp/xregexp.js"></script>
<script type="text/javascript" src="/static/admin/js/calendar.js"></script>
<script type="text/javascript" src="/static/admin/js/admin/DateTimeShortcuts.js"></script> <script type="text/javascript" src="/static/mezzanine/tinymce/tinymce.min.js"></script> <script type="text/javascript" src="/static/mezzanine/tinymce/jquery.tinymce.min.js"></script> <script type="text/javascript" src="/static/mezzanine/js/tinymce_setup.js"></script> <script type="text/javascript" src="/static/mezzanine/js/admin/keywords_field.js"></script>
<script type="text/javascript" src="/static/admin/js/collapse.js"></script>







</head>

Thank you for you focus

Cheers

Mike


--
You received this message because you are subscribed to the Google Groups "Mezzanine 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to