[pmwiki-users] Import (cookbook)

Petko Yotov 5ko at 5ko.fr
Fri Nov 17 02:36:50 PST 2023


If really some pages have not been edited, I suspect there may have been 
something in the texts or in the session that blocked the saving of the 
page.

This may be a text string that is in a blocklist, or a missing author 
name, token, or something else, that in a normal editing session would 
re-open the edit form.

I see the ImportText recipe doesn't check for $IsPagePosted and directly 
marks the file as imported and archives it.

I updated the recipe to check for this, to log failed edits and not 
archive the file, although it doesn't detect the reason for the failure.

Also, if edited pages don't appear in Recent Changes, the variable 
$RCLinesMax may cause this:

   https://www.pmwiki.org/wiki/PmWiki/LayoutVariables#RCLinesMax

Petko

On 17/11/2023 10:40, Gregor Klarič wrote:
> Hello,
> While on the topic of import.php:
> When I was using this import functionality in the past on many
> files(1000+) sometimes the files would be marked as imported, but the
> page itself wasn't edited, despite the file containing an updated
> content. I never was able to pinpoint why that happened.
> Kind Regards,
> Gregor
> 
> Am Do., 16. Nov. 2023 um 15:12 Uhr schrieb Petko Yotov <5ko at 5ko.fr>:
> 
>> Updated, thanks!
>> 
>> Petko
>> 
>> On 16/11/2023 14:30, ABClf wrote:
>>> As an anecdotical remark, I have tested Import cookbook for a few
>> files
>>> ;
>>> it works (and it's convenient to have) ; yet there is an error
>> message
>>> at the end of the process :
>>> 
>>> <b>Deprecated</b>:  Function create_function() is deprecated in
>>> <b>/bla/bla/import.php</b> on line <b>80</b><br />
>> 



More information about the pmwiki-users mailing list