[pmwiki-users] Import (cookbook)

Gregor Klarič klaric.gregor at gmail.com
Fri Nov 17 04:29:56 PST 2023


> I suspect there may have been something in the texts
> or in the session that blocked the saving of the page.

My workaround has been to identify the pages not updated by looking at the
last changed date in the file system and re uploading the texts for the
pages which were not updated.
Usually  when updating 3000 pages it took 3-4 rounds to get all updated.

>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.

This should help, thank you!


Am Fr., 17. Nov. 2023 um 11:36 Uhr schrieb Petko Yotov <5ko at 5ko.fr>:

> 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 />
> >>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20231117/ee786ea2/attachment.html>


More information about the pmwiki-users mailing list