From: luciash <lu...@ti...> - 2012-04-23 10:30:07
|
Hi Robert, I have this problem when trying to save a Wiki page on upgraded 9.x branch SVN: System error. The following error message was returned: Unknown column 'status' in 'field list' The query was: INSERT INTO `tiki_pages` (`pageName`, `hits`, `data`, `description`, `lastModif`, `comment`, `version`, `version_minor`, `user`, `ip`, `creator`, `page_size`, `is_html`, `created`, `wysiwyg`, `wiki_authors_style`, `status`, `flag`, `lockedby`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) Values: Accueil 0 1335176885 1 0 admin ::1 admin 0 0 1335176885 n new9+ The built query was likely: INSERT INTO `tiki_pages` (`pageName`, `hits`, `data`, `description`, `lastModif`, `comment`, `version`, `version_minor`, `user`, `ip`, `creator`, `page_size`, `is_html`, `created`, `wysiwyg`, `wiki_authors_style`, `status`, `flag`, `lockedby`) VALUES ('Accueil', '0', '', '', '1335176885', '', '1', '0', 'admin', '::1', 'admin', '0', '0', '1335176885', 'n', '', 'new9+', '', '') On 20.4.2012 22:16, Robert Plummer wrote: > Hey guys, > I'm now working on the upgrade script being added to history items, > but here I'd like to tell you what it does and how it works. Also, > xavi, just ran it on your website and Configuració+dels+Equips seems > to work great! For everyone else that is a very very big page where > plugin code is used often, and it seems to do the trick. I'm so > excited! Anyway what the script does: > > * The class (convertPagesToTiki9) is found in lib/wiki/wikilib.php > * A new column "status" is added to tiki_pages and tiki_history > o Why a new column you might ask? Well it is reusable, first, > but most important we want this to be a fast process and we > want to limit resource usage, using another attribute system > was just too much overhead imo, but if you want it that way, > you can code it. > * For wiki pages found in "tiki_pages" we lookup all pages that > don't have a status of "conv9", we can change this, I figure it > would help us in the future though with other types of upgrades if > they are ever needed > * We now iterate through those pages, first we find the plugins that > exist within non-html decoded pages, which is like the old way (we > use these later to match up fingerprints of plugins) > * We next html decode the page data and again find the plugins > (these will be the replacement fingerprints for the old ones in > the previous step) > * We now remove those plugins and check the plugins parameters to > see if they were double encoded and we decode them if needed > * We now insert the new plugins back into the page data > * After we have the old plugin fingerprints, the new plugin > fingerprints, and the new data, we can now update > tiki_plugin_security to allow those new plugins to execute > * We now iterate over the plugin fingerprints, both old and new > o Remove any conflicting fingerprint to that of the new plugin > fingerprint, if we don't do that, it will fail because they > have to be unique (table setup) > o We update the old plugin fingerprint with the new plugin > fingerprint > * Now that all the plugins have been updated, we can update the > page, if the above fails at least the page will be ok > * We update the page and set status to "conv9" > * We are DONE! > > How does the new parser work along with this change? (you might ask) > > * At the very beginning of a parse we replace (or protect) special > characters/character strings like "<", ">", " ", & "& " with a > string that the parser can't decode or encode > * Right before something needs the data, we restore the characters > (or unprotect them) > * At the very end of a parse, we as well restore or unprotect those > protected character strings > * If edit mode runs or wysiwyg or html out we restore alternate > characters if/when they are needed > > Now that most of the code is in place (and that I've violated the > freese by doing so, sorry guys, I couldn't think of a easier way to do > this stuff) we can continue to fix it and make sure that pre 6 works > well and that any bugs can be smashed. > > Lets beat this thing up guys & make sure this is the best tiki yet! > > -- > Robert Plummer > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > > > _______________________________________________ > TikiWiki-devel mailing list > Tik...@li... > https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel |