[pmwiki-devel] Upgrade cookbook recipes/markup
Petko Yotov
5ko at 5ko.fr
Wed Dec 6 14:05:19 PST 2023
The recipe doesn't "touch" the file, it writes over it. I suspect there
were no changes in your calendar events. Try removing the file then edit
a page to see it regenerated.
You shouldn't need a pagelist, just add or edit a page in the Calendar
group for a date like Calendar.20231226 and add events in the expected
format, see Usage section in the cookbook page.
Then check the exported file.
Petko
--
If you upgrade : https://www.pmwiki.org/Upgrades
On 06/12/2023 22:33, Crisses wrote:
> Thanks so much. It doesn’t work (the file contents didn’t update as I
> would expect) — but this gives me a place to get started at least. It
> touched the file, but didn’t replace the contents — the web server
> does have access to the file it touches. If I look at the original
> instructions “Usage", it looks like I need a pagelist of upcoming
> events. I’ll play around with it.
>
>
>> On Dec 6, 2023, at 2:40 PM, Petko Yotov <5ko at 5ko.fr> wrote:
>>
>> I don't use this recipe, or WikiCalendar, but looked into it and it
>> "should" have mostly worked.
>>
>> I made a number of optimizations and minor changes and uploaded a new
>> version. It appears to work up to PHP 8.3.0.
>>
>> Notes about your message:
>>
>> 1. The Markup() registration is commented out, as well as the output
>> inside the function, so it is not expected to do anything.
>>
>> 2. The recipe outputs a file Calendar.ics into the uploads/Calendar/
>> directory, only when a page in the "Calendar" wikigroup is edited and
>> saved. Nothing is expected to show on your screen, just check that the
>> file is saved in the directory at the time of the edit.
>>
>> 3. The recipe would fail if there is no uploads/Calendar/ directory. I
>> now changed it to create such a directory if it doesn't exist.
>>
>> 4. If the file is not saved or not updated, you should check the
>> permissions for the directory, although if you are able to upload
>> files, it "should" work. In fact, the recipe uses the per-group upload
>> directory (which is usual in PmWiki) but if you have custom per-page
>> or per-wiki upload directories, the recipe's directory may be
>> unexpected and may need permissions to be set.
>>
>> I did not change this as existing users would have already subscribed
>> to these files.
>>
>> 5. In the VCalendar event descriptions, the wikipage URLs were in a
>> specific format so on some servers the links could possibly not open
>> the correct wiki page. I have fixed this to show the actual URLs of
>> the pages.
>>
>> 6. There was a call to the deprecated function utf8_decode(), but it
>> should not be needed, as VCalendar files are expected to be in UTF-8.
>> I've removed it; if the wiki is not in UTF-8, and the Vcalendar worked
>> before, it should still work now.
>>
>>
>> I personally don't use WikiCalendar or VCalendar files but the
>> Validator finds many errors in a sample file I generated. Somebody
>> else should help with this:
>>
>> https://icalendar.org/validator.html
>>
>> Petko
>>
>>
>> On 06/12/2023 18:00, Crisses wrote:
>>> It’s been a decade since I've done any PHP coding — so upgrading some
>>> wikis that were outdated I’m banging my head against obsoleted
>>> plug-ins.
>>> Here’s one I’m at a loss with:
>>> icalexport.php
>>> The version on the site is not working, and I’m not sure what’s
>>> causing it to fail. A few things have changed between PHP versions
>>> and
>>> PmWiki versions that I’m not sure which is the problem.
>>> Can anyone help with updating icalexport.php to be current? It’s
>>> probably something in the Markup() function not being parsed
>>> correctly, but there may be other PHP issues. It’s quite old and the
>>> recipe says “Stable”.
>>> Thanks for any help,
>>> Crisses
More information about the pmwiki-devel
mailing list