Michael Williamson
Forum Replies Created
-
Forum: Plugins
In reply to: [Mammoth .docx converter] Fatal error out of memoryClosing since I strongly suspect Mammoth isn’t causing issues here. Having said that, feel free to reopen if you find evidence to the contrary!
Forum: Plugins
In reply to: [Mammoth .docx converter] Plugin not working with Custom Post TypeOn closer inspection, this turns out to be easier than I thought. Could you give the latest version a try?
Forum: Plugins
In reply to: [Mammoth .docx converter] Plugin not working with Custom Post TypeAt the moment, Mammoth only supports a hard-coded list of post types. I’ll investigate how to support custom post types, but it might be a week or two before I get chance to have a look. You’re certainly more than welcome to take a look if you’re so inclined: I suspect it’ll involve fetching the list of custom post types that support
editor
, but I could be way off.In the meantime, you can resort to a bit of hackery if you don’t want to wait:
mammoth-docx-converter.php
defines the post types it supports on the line$screens = array( 'post', 'page' );
. If you add in extra post types, then the plugin should appear.Forum: Plugins
In reply to: [Mammoth .docx converter] Fatal error out of memoryHello,
Do you mean the server is displaying an out of memory error? Or your browser? If you could provide the exact, entire error message copied verbatim, then it would be easier to diagnose the issue.
If it’s the server, then I’d suspect that the issue isn’t with this plugin since it does virtually nothing on the PHP side — all of the interesting code is client-side JavaScript. I’d suspect that without the plugin, you’re already close to being out of memory, and this plugin just pushes it over. Therefore, I’d try increasing the memory available to PHP, or seeing if there’s another plugin that has high memory usage.
If you still think this plugin is causing high memory usage, then let me know.
Forum: Plugins
In reply to: [Mammoth .docx converter] convert with endnotesGreat! I’ll mark this as resolved since it seems like everything is working.
Forum: Plugins
In reply to: [Mammoth .docx converter] convert with endnotesHmm, this might be a caching issue. Could you clear the cache in your browser, and try again?
Forum: Plugins
In reply to: [Mammoth .docx converter] convert with endnotesHello Kim,
I’ve updated the plugin to handle endnotes, so hopefully this fixes the issue for you. Let me know if not.
Thanks
Michael
Forum: Plugins
In reply to: [Mammoth .docx converter] Some images don't upload/import correctlyThanks for the file. It looks like those images are EMF images (whereas the ones that work are PNGs), and I’m not sure how practical it’s going to be to support them in JavaScript. I’ll take a proper look when I get a chance, but that might not be for a week or two.
Forum: Plugins
In reply to: [Mammoth .docx converter] Some images don't upload/import correctlyHello David,
Thanks for the kind words! It’s likely that the pictures are included in the document in a way that Mammoth doesn’t yet support. If you could provide a document that has missing images when imported, then I can take a look and see whether it would be easy to fix or not.
Thanks
Michael
Forum: Plugins
In reply to: [Mammoth .docx converter] convert with endnotesThe unrecognised run and paragraph style messages just mean that the endnote references and text will be styled using default styling. If the styling looks okay to you, then it’s not an issue.
As for the spacing: do you mean the spacing between each endnote when they’re printed out at the end of the converted document? Mammoth just creates an ol element: the spacing between each list item will be determined by the styles you have on your site. If you still think that Mammoth is producing incorrect HTML, then it would be helpful to have:
* an example input document
* the actual HTML the conversion produces
* the expected HTMLForum: Plugins
In reply to: [Mammoth .docx converter] convert with endnotesI’ve just added endnote support to the development version of mammoth.js. Could you try using the converter on the page linked below, and see if produces the expected output?
Forum: Plugins
In reply to: [Mammoth .docx converter] convert with endnotesHello! Thanks for the feedback. At the moment, Mammoth has no support for endnotes: I just add support for features as they’re needed. Assuming that endnotes can be supported in much the same way as footnotes, this should be reasonably straightforward. I might not have time to take a look until the weekend though.
Forum: Plugins
In reply to: [Mammoth .docx converter] JS error on load and on inserting into editorThe latest version (0.1.12) should hopefully fix the error on tabs.js, but I couldn’t reproduce the errors when importing. Could you try importing a document with a just one paragraph of text? Also, if you could provide stack traces for those errors, that would be handy.
Forum: Plugins
In reply to: [Mammoth .docx converter] How do you use it?Closing this issue, but feel free to shout if you still have any problems.
Forum: Plugins
In reply to: [Mammoth .docx converter] Error while attempting to convert file:Definitely looks like the issue is the 500 error. I think you’ll have to dig through your logs (presumably your IIS logs) to work out what’s actually causing the 500 errors.