curtdoolittle
Forum Replies Created
-
Template name must be single-documentor-sections.php
This template structure supplies the divs and the styles. You get the idea….
-Cheersget_header();?> <div id="fullpage"> <div class="wpb_wrapper"> <link rel="stylesheet" href="http://www.realitybychanting.com/wp-content/plugins/documentor-lite/skins/default/style.css" type="text/css" media="all"> <div id="documentor-1" class="documentor-default documentor-wrap" data-docid="1"> <div class="doc-sec-container" id="documentor_seccontainer"> <div class="doc-section wow documentor-animated documentor-fadeIn" style="visibility: visible; animation-name: none;"> <?php if (have_posts()) : while (have_posts()) : the_post(); $post_id = get_the_ID(); the_title( '<h1 class="doc-sec-title">', '</h1>' ); $content = get_the_content(); $content = str_replace(']]>', ']]>', apply_filters('the_content', $content )); echo $content; endwhile; endif; wp_reset_query(); ?> </div><div id="doc_section_end"></div> <div class="doc-help"></div> </div><div id="doc_sec_container_end"></div> </div> <div class="cleardiv"> </div> <div id="documentor-1-end"></div> </div><div id="wpb_wrapper_end"></div> </div><div id="fullpage_end"></div> <?php get_footer(); ?>Why? The layout of the guide in the default style is gorgeous.
At some point I’ll write a filter that allows you to choose whether to open the entire guide as is now, or whether to display just a single section and it’s children.
The other option I can think of is to just use different documents to represent each section, and configure the page with multiple documents.
cheers
Am I correct that I:
1 – create a new page template,
2 – name it single-section.php
3 – include the section.php template partis that right?
HERE IS THE CAUSE OF YOUR DEFECT
1) You are not decomposing the array into a string, and reconstructing the array from the string on the server side. Instead you are passing variables (a single post with thousands of variables) to the server.
2) The server is truncating the post after whatever is set by php.ini->max_num_variables.
3) The first value you validate on the server side is the document name, which is one of the last variables sent in the array. This causes the error stating that the document name (guidename) is not ‘set’.THE HACK
Get the hosting company to change max_num_variables to 1000 per 100 document sections. WHY IS THIS A PROBLEM: this variable is often sent half a dozen places, including .htaccess, and is almost impossible to find or override it. Furthermore, it is BAD PRACTICE to send so many variables to a server. (not that bad practice has ever stopped php developers. 🙂THE FIX
In the posting routine, either serialize or json enconde the array, then send it as a single variable, and reconstruct the array on the server side. Given the relatively small amount of data.This fix requires a few lines of code, will conform to accepted practices, and allow virtually unlimited number of document sections.
It’s too bad really. The UI is pretty sweet. Works great. Beautiful to look at.
But the way you’re updating the sections table is for small scale stuff.
… damn… and it was looking so good…This issue is still open as of february 7th 2016.
The plugin appears to be designed for updating the hierarchy as a batch, all of which is saved during a single post, instead of updating the post order by using an ajax call every time a page is moved within the hierarchy.
The current method will eventually fail, so it is not possible to create an unlimited number of sections, and Documentor can only be used for small documents.
The only workaround that I can think of is to use the pro version, break your documentation into chapters or sections, and to place multiple ‘documentor guide’ shortcodes on the same page. This means it is not possible to move content between sections. But you could (I assume) create a (slow) but large document.
Or is there a fix or workaround to this that I don’t know about?
Thanks
Forum: Fixing WordPress
In reply to: Images upload but will not appear in file browserYes. This is a wordpress bug in 5.0.
The thread that gives the workaround is:
Glad I could help myself. 🙂
Forum: Fixing WordPress
In reply to: Images upload but will not appear in file browserI’ve managed to trap the error message. Any ideas? This LOOKS like a bug….
==========
WordPress database error: [Field ‘post_content_filtered’ doesn’t have a default value]
INSERT INTO wp_posts (post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, pinged, post_modified, post_modified_gmt, post_parent, menu_order, post_mime_type, guid) VALUES (‘1’, ‘2007-01-04 10:33:38’, ‘2007-01-04 18:33:38’, ”, ‘yeager-on-calculaation.pdf’, ”, ‘attachment’, ‘open’, ‘open’, ”, ‘yeager-on-calculaationpdf’, ”, ”, ‘2007-01-04 10:33:38’, ‘2007-01-04 18:33:38’, ‘-1167935273’, ‘0’, ‘application/pdf’, ‘http://localhost/wp-content/uploads/2007/01/yeager-on-calculaation.pdf’)WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 3]
SELECT category_id FROM wp_post2cat WHERE post_id =WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ 1)’ at line 2]
INSERT INTO wp_post2cat (post_id, category_id) VALUES (, 1)Forum: Fixing WordPress
In reply to: Images upload but will not appear in file browserI’m still having the problem. Any ideas?