Hi,

hope you are fine. Maybe you have an idea.

I am running a local news magazine website, where i am getting events as ICS files, its the local concerts, clubnights, parades, parties, any other day and nightlife events.

I have a category "events" where i would love to automatically get all the events as standardized articles.

so i thought: i have that event calender which has an output feed as an iCal feed, the software is called www.time.ly. is there any module or other possibility to read their feed? i looked up many possibilities, but the ical Feed Parser for example is only for Drupal 9, not 10 yet.

Maybe you got an idea how to solve this, then i would have not to double the work and make an article on Drupal out of each event in time.ly

thank you :-)

Comments

gisle’s picture

Have you considered Feeds iCal?

The most recent release is currently constrained to Drupal 9. But it should be trivial to make it compatible with Drupal 10, according to this rector patch: #3329259: Automated Drupal 10 compatibility fixes.

You may want to nudge one of the maintainers to create a new tagged release with this patch.

If the maintainers don't respond to your nudging, you may consider adopting it to push the required patch yourself. To follow that path, please see: How to become project owner, maintainer, or co-maintainer.

Another thing you may try is to bypass the project's version contraint by Using Drupal's Lenient Composer Endpoint.

- gisle

rockmachine’s picture

thank you. hehe yes, in fact this is the module i have in mind, and i already wrote to ben, who is one of the maintainers. maybe he will answer soon, it would help really alot.

im new to drual since a few months, so i dare not to say at this point that i could become a maintainer myself. at a later stage im totally open to it of course, but right now i still feel very much at the beginning of this wonderful cosmos.

thank you for your reply, this is very cool to see.

i cant estimate how risky it is to bypass the version constraint... maybe you have an idea? i am open to experiments, its not a huge corporate website but just a cool magazine.

gisle’s picture

The "lenient" composer endpoint is a fairly new innovation in the Drupal ecosystem, and to be honest, I've no experience with using it.

As always, when using features one is not familiar with, you should never deploy them first on a production website. Have a test website that is an exact clone of the production site database and code base. Deploy the new feature on the test website and test, test and test again. If you're confident that there are no harmful site effects, make a backup of the production website and then deploy the module on the production website.

- gisle

rockmachine’s picture

absolutely agree, its all done on a test environment, and then once it works and its tested, i move it to live. right now, im still in the process of finding the right ingredients for my little soup, but i bet a drupal10 - modified Feeds iCal could do the trick, since i dont have (and i dont want to have) any special challenges. i just want the title, date, body text, picture and other elements like url to be transformed into an article, which i can review and approve.

background is that many local event promoters will then submit their events, and i then dont need to always copy paste to make an article out of them as well, but just review and approve them. sounds like the future but i bet this can already be done in 2023 ;) hehe

rockmachine’s picture

hi, thanks again for the advice. ive managed to get it installed, with the lenient thing, its working.

prob is only, when i want to create such a feed, i get an error message, the whole page only shows one error (that general error message i bet you know).

the report in the backend says its this error:

Error: Call to undefined function Drupal\feeds_ical\Feeds\Parser\drupal_get_path() in include() (line 5 of /www/htdocs/w01df431/modules/contrib/feeds_ical/src/Feeds/Parser/IcalParser.php).

and this is the interpretation including a first advice i found out:

The error indicates that the function drupal_get_path() cannot be found in the file IcalParser.php of the feeds_ical module. This is a bit odd, as drupal_get_path() is a core function of Drupal and should not be undefined.

A potential cause for this issue could be that the module is not fully compatible with your current version of Drupal. Given that the error message specifically points to the file IcalParser.php, it could be the case that this file does not properly work with newer versions of Drupal.

A potential solution could be to check whether you have the latest version of the feeds_ical module installed. If not, you should update the module.

If you are already using the latest version of the module, it could be helpful to inform the developers of the module about this error. It could be a bug that they need to fix.

In the meantime, you could try commenting out or removing the line of code that is causing this error, though this should only be considered a temporary solution and may not work depending on how critical this line is for the function of the module.

so my question is: what would you recommend?

again thanks for helping me on this, very much appreciated!

gisle’s picture

I am unable to make sense of the "interpretation" you've included (in italics) in your post. It looks like gibberish to my eyes. Where did it come from?

For what it is worth: drupal_get_path() have been deprecated since Drupal 9.3, and was removed in Drupal 10.0.0, see this change notice: drupal_get_path() and drupal_get_filename() have been deprecated in favor of extension listing services.

However, this deprecation was fixed in Feeds iCal a long time ago. There is no call for drupal_get_path() in version 2.0.4 of this module (the one I think should work with Drupal 10). If you get this error, you must somehow have downloaded and installed an outdated version.

Composer protects you against downloading an outdated version. It looks like using the "lenient" endpoint removes this protection, and you end up with the ability to shoot yourself in the foot.

I can't offer much more in the way of recommendations. As things now stands, the Feeds iCal module appear to be abandoned. Unless you have the skills and resources to take over maintenance yourself, it is probably best in the long run to stay away from abandoned software.

- gisle

rockmachine’s picture

thank you again for your words, they caused a lot of things.

first, my source of "inspiration" is gpt, it talks alot of rubbish indeed but on the other hand i wouldnt be here without it, therefore the plusses outweigh the minusses at least from my todays point of view.

re the ical feeds module: thanks for the hints, i was able to install it now (lenient endpoint + patch + version 2.0.4), and im about to get it going right now i hope. the difficulties are now in mapping the right parameters, ill dive into it this weekend.

i dont close this topic yet, bcs i cant exclude the possibility yet that the difficulties come from parsing the datastream, but once i have clarity, ill get back here and write an update.

again, its very very nice and helpful to have advice from you guys here, this feels really good and its so much fun when it finally works ;) thank you!

rockmachine’s picture

just an update, i havent managed yet to import data via the ical feed, but that is still in progress.

another thing came up: for a second part-project on my website, i need a proper rss feed so i tried to install views-rss. this didnt work, because there seems to be a dependancy with feeds ical. here what she shell gave me:

ssh-SSSSSSSSSS@SSSSSSSS:/www/htdocs/w01df431$ composer require 'drupal/views_rss:^2.0' --with-all-dependencies
Info from https://repo.packagist.org: #StandWithUkraine
./composer.json has been updated
Running composer update drupal/views_rss --with-all-dependencies
Gathering patches for root package.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires drupal/feeds_ical 2.0, found drupal/feeds_ical[2.0.0] but the package is fixed to 2.0.4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
ssh-w01df431@dd11620:/www/htdocs/w01df431$

maybe you have an idea how i could solve this? can it be that the composer.json file which i had to alter is causing this?

rockmachine’s picture

hi, hope you are all well.

so today, ben has updated the ical feeds module, so its compatible with d10. i once installed the module using the lenient endpoint, and worked with it, but now of course would love to kick out the lenient endpoint again and replace the module. would you have any recommendations how to do this? just replace the module folder and run the update.php? how do i get rid of the lenient endpoint?

the thing is: the whole thing is working so well, would be a pity to do something wrong now. ical feeds is working fine with d10.

thanks for your help in advance, and thank you for caring about this module.

rockmachine’s picture

another update: i downloaded composer.json and updated the version of feeds ical from 2.0 to 2.0.4, then ran the composer update to update composer.locl and that worked. i hope there wont be any more additional problems in the future. ive now installed views rss and it seems to work as well