<![CDATA[ PubKit: 0.7.1 (20 Oct 10): front-end document and record creation and management - My Forums]]> https://forums.modx.com/thread/?thread=43467 <![CDATA[Re: PubKit: 0.7.1 (20 Oct 10): front-end document and record creation and management]]> https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=7#dis-post-500948 Quote from: kp52 at May 06, 2014, 07:32 PM
The message appears to be due to a change in MODX 1.0.13. In earlier versions, the statement
	$next = $modx->db->select('@rank');

on line 103 of pubKit.functions.php would have come back as false because no table is given as the "from" parameter; now it exits with the error message "Empty $from parameters in DBAPI::select()."
....So you could try commenting out the line, and setting "return false;" or just "return;" at the end of the function.

This solution works for me with evo 1.0.14
Thank you very much smiley]]>
banzai Jun 19, 2014, 07:42 PM https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=7#dis-post-500948
<![CDATA[Re: PubKit: 0.7.1 (20 Oct 10): front-end document and record creation and management]]> https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=7#dis-post-497173 I will try your modification tomorrow.

Thank you very much for quick help and for this great snippet - for me - the best front end editor form evo/clipper

take this opportunity to ask you a question.
How do you send the 'webuser author' in the form input post?

I use a combination of TV and snippet to get webuser author of the post

1) an "author" tv
2) a snippet "Username" with code
<?php
$user = $modx->getLoginUserName();
if ($user) {
  return  $user;
} else {
}
?>



3) in the input form
<input type="text" class="medium" name="author" id="author" value="[[Username]]" readonly>
]]>
banzai May 06, 2014, 05:04 PM https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=7#dis-post-497173
<![CDATA[Re: PubKit: 0.7.1 (20 Oct 10): front-end document and record creation and management]]> https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=7#dis-post-497154
	$next = $modx->db->select('@rank');

on line 103 of pubKit.functions.php would have come back as false because no table is given as the "from" parameter; now it exits with the error message "Empty $from parameters in DBAPI::select()."

I don't have any sites with MODX 1.0.13 (I now work with Clipper rather than MODX), so cannot test, but as far as I can tell using text searches in other PubKit installs, the return value from resetRank is not used anywhere. So you could try commenting out the line, and setting "return false;" or just "return;" at the end of the function.

Alternatively, it seems you could keep the DBAPI happy by supplying the dummy table name DUAL (not tested; see https://dev.mysql.com/doc/refman/5.5/en/select.html):
	$next = $modx->db->select('@rank', 'DUAL');

:) KP]]>
kp52 May 06, 2014, 02:32 PM https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=7#dis-post-497154
<![CDATA[Re: PubKit: 0.7.1 (20 Oct 10): front-end document and record creation and management]]> https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=7#dis-post-497143
On a client site (evo 1.1.13) with Pubkit i Have a strange error when publishing.

« MODX Parse Error »
MODX encountered the following error while attempting to parse the requested resource:
« Empty $from parameters in DBAPI::select(). »
Basic info
REQUEST_URI : 	http://www.domain.it/area-utente/form-inserzione.html
Resource : 	[96]Inserisci Ditta Traslochi
Current Snippet : 	PubKit
Referer : 	http://www.domain.it/area-utente/form-inserzione.html
User Agent : 	Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36
IP : 	94.39.3.160
Benchmarks
MySQL : 	0.0098 s (63 Requests)
PHP : 	0.0625 s
Total : 	0.0723 s
Memory : 	3.4278793335 mb

Backtrace
1	DocumentParser->executeParser()
index.php on line 144
2	DocumentParser->prepareResponse()
manager/includes/document.parser.class.inc.php on line 1598
3	DocumentParser->outputContent()
manager/includes/document.parser.class.inc.php on line 1699
4	DocumentParser->parseDocumentSource()
manager/includes/document.parser.class.inc.php on line 591
5	DocumentParser->evalSnippets()
manager/includes/document.parser.class.inc.php on line 1480
6	DocumentParser->_get_snip_result()
manager/includes/document.parser.class.inc.php on line 1079
7	DocumentParser->evalSnippet()
manager/includes/document.parser.class.inc.php on line 1166
8	eval()
manager/includes/document.parser.class.inc.php on line 1027
9	require_once()
manager/includes/document.parser.class.inc.php(1027) : eval()'d code on line 223
10	resetRank()
assets/snippets/pubKit/pubKit.inc.php on line 233
11	DBAPI->select()
assets/snippets/pubKit/pubKit.functions.php on line 103


seems related to the function resetRank, but can't understand]]>
banzai May 06, 2014, 12:52 PM https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=7#dis-post-497143
<![CDATA[Re: PubKit: 0.7.1 (20 Oct 10): front-end document and record creation and management]]> https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=6#dis-post-446479 Quote from: sharkbait at Nov 27, 2012, 04:10 PM
btw. I get "Check configuration. Set &root as -1 for entire tree" on the "ExportPages" module, any ideas?

Export and import modules are now improved and published as a separate Extra: http://modx.com/extras/package/importexportcsv

;) KP]]>
kp52 Dec 10, 2012, 05:44 AM https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=6#dis-post-446479
<![CDATA[Re: PubKit: 0.7.1 (20 Oct 10): front-end document and record creation and management]]> https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=6#dis-post-444865
actually what I might try to replicate is more of a news section than a blog (no tags, categories, comments etc.).
There's only a paginated overview of the items with excerpt, pubdate and author and teaser image on the actual news page itself.

The site has currently 1900 ressources and is (in my opinion) reasonable fast, but since 1 or 2 items are added every day, I have to plan ahead ...either move it away from MODX completely or separate the news-section with a custom table, so I'm brainstorming a bit smiley

yes, LoopDBChunk could work, btw. I'd definitely need have custom URL-aliases too, would that be easily doable (e.g. an input field like ressources have)?

cheers, j]]>
anonymized-26931 Nov 27, 2012, 11:58 PM https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=6#dis-post-444865
<![CDATA[Re: PubKit: 0.7.1 (20 Oct 10): front-end document and record creation and management]]> https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=6#dis-post-444795 Quote from: sharkbait at Nov 27, 2012, 04:10 PM

would it be possible to recreate an existing blog with PubKit, circumventing the cache bottleneckt with custom tables?

More room here than in a tweet! Starting from an extreme and working backwards, you could replicate the structure of the site_content table in your own table, and delete whatever columns are superfluous (among which would probably be "parent"). I think that would give you item storage outside the cache mechanism. Then you'd need custom snippets to do what Ditto does so well; the ListSections in my demo could be a starting point, or the old loopDbChunk extra, which has some templating. Or even a customized version of Ditto (?Blitto?), set to use your table instead of site_content as its data source.

You'd lose TVs as tags, but now you don't need an open set of TVs, you can create your own fields for tagging as required. (NB you can still use TVs to provide things like shared drop-down lists, but not store the selections in the TV tables per item as you would in a MODX resource).

and in your demo-setup, what's the difference between the news section and the blog
They demonstrate use of different selections of heading fields, also the two-level tagging in the News section (category + tags).

btw. I get "Check configuration. Set &root as -1 for entire tree" on the "ExportPages" module, any ideas?
Ha! Me too! The export works for sets of pages starting with an actual page, but not as yet for the whole MODX tree. Need to work on that one a bit more, also on making the Import a bit friendlier (it fails if there's no database table to import at the moment, and setting the module ID is a bit cacky). See attached pic of configuration of the Export module for sending 27 & its children to a file called allPages.csv in the assets/export directory.

I made progress on some other aspects of PubKit in October, but ran out of time to tie it all up; I hope to be retreating to my coding cave again this weekend to make something more of it.

:) KP]]>
kp52 Nov 27, 2012, 02:05 PM https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=6#dis-post-444795
<![CDATA[Re: PubKit: 0.7.1 (20 Oct 10): front-end document and record creation and management]]> https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=6#dis-post-444762
thanks for your addons! I can't even imagine how much time & effort you must have put into this smiley

would it be possible to recreate an existing blog with PubKit, circumventing the cache bottleneckt with custom tables?
and in your demo-setup, what's the difference between the news section and the blog

btw. I get "Check configuration. Set &root as -1 for entire tree" on the "ExportPages" module, any ideas?

cheers, j]]>
anonymized-26931 Nov 27, 2012, 10:10 AM https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=6#dis-post-444762
<![CDATA[Re: PubKit: 0.7.1 (20 Oct 10): front-end document and record creation and management]]> https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=6#dis-post-444737 mpbouch Nov 27, 2012, 07:22 AM https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=6#dis-post-444737 <![CDATA[Re: PubKit: 0.7.1 (20 Oct 10): front-end document and record creation and management]]> https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=6#dis-post-444733 :) KP]]> kp52 Nov 27, 2012, 06:31 AM https://forums.modx.com/thread/43467/pubkit-0-7-1-20-oct-10-front-end-document-and-record-creation-and-management?page=6#dis-post-444733