Please port to Drupal 7.

CommentFileSizeAuthor
#12 gcalbug.png8.16 KBreg.doug
#4 gcal_events_d7.zip14.06 KBjdwfly
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

int’s picture

Priority: Normal » Major

Now it's a good time to port you module.

Everyone will be using D7 soon.

int’s picture

Drupal 7 Beta 3 is out

jdwfly’s picture

How many of you wouldn't mind if I switched this to use the built-in simplexml parser instead of simplepie? I've already toyed around with it and I don't think it will be all that difficult and it would eliminate the need for simplepie.

jdwfly’s picture

Status: Active » Needs review
FileSize
14.06 KB

Well here it is, but this is a straight port of the current drupal 6 dev. I'd post a patch but it could get pretty confusing since there were quite a few coding formatting problems and some i18n issues. This works quite well on the current d7 head. If the maintainer of this module would give me access I would gladly commit this and start the drupal 7 branch.

btw this still uses simplepie so you will need to install that into the module directory. I only tested it with simplepie 1.1.3 so if you use another version I can't guarantee it will work for you.

Se7enLC’s picture

Thanks for putting the work in! I've been very busy and haven't put much of any work at all into maintaining this app. I just downloaded it and tried it out, and I'm not sure if it's quite working. I'm testing on 7.0beta3. I'm not able to get into the modules configuration screen at all (no configuration link shows up in the module list), and I'm also not able to get calendars to load. I ran into the same issue in the brief amount of time I started trying to migrate it to 7.

I support switching to the built-in XML parser. I remember having some trouble with it before, but it's probably matured a lot since then.

I'll have to figure out what the process is to get you added to the project in drupal. Are you already a developer for drupal? I remember there were a few hoops I had to jump through first.

int’s picture

Drupal 7.0-rc1 out

jdwfly’s picture

I already have cvs access. You should see a tab called maintainers on your project page. That will take you to a page where you can add me as a project maintainer.

Hmm, I forgot to include the configure link in the info file. if you add:

configure = admin/config/content/gcal_events

Then the link should show up.

If we want to switch to the different parser it would probably be best to do a straight port of what the module is now and then start a 2.x branch with the simplexml parser.

int’s picture

drupal-7.0-rc2 was released

jdwfly’s picture

I'm still waiting on access to commit what I've done.

SDR’s picture

Category: task » feature
Status: Needs review » Patch (to be ported)

This would be good gravy on top of a recent Drupal 7 live site I have made.

jdwfly’s picture

Category: feature » task
Status: Patch (to be ported) » Needs review

I just got commit access and will be putting this on later tonight, but if I could get someone else to confirm/test the D7 version that would be helpful.

reg.doug’s picture

FileSize
8.16 KB

I don't know if this is a D7 problem specifically, but since I don't have the D6 version I will post it here.

All of the markup is being escaped for each event leading to something like the attached image.

reg.doug’s picture

Whoops! That was my fault. I didn't see the "Input Format" box.

pdcrane’s picture

I have tested the D7 port and I'm receiving the following errors when viewing pages featuring the module:

Warning: Invalid argument supplied for foreach() in gcal_events_just_entries() (line 987 of /html/sites/all/modules/gcal_events/gcal_events.module).
Notice: Undefined variable: just_entries in gcal_events_just_entries() (line 990 of /html/sites/all/modules/gcal_events/gcal_events.module).

This ONLY happens when not logged in as an Admin.

I've searched through the issues posted here and the README.txt and haven't found a solution. Any ideas?

pdcrane’s picture

I turned on debugging for the module and discovered that $events wasn't being passed to gcal_events_just_entries() as an array because the filter_format was set to Full HTML. This outputted the string "Input Format !Full HTML is not accessible by the current user"... thus $events wasn't an array and foreach() was failing.

I confirmed this by switching the Input Format type to Plain Text and the module works fine logged in or not... However, even when using Filtered HTML as the input type, it doesn't maintain my formatting. It's not ideal to provide anonymous users access to div and span tags...

soooooo... I'm not really that great with PHP, so I'm not really sure how to fix this...

Hopefully someone can help.

Thanks all!

pdcrane’s picture

For now I switched div/span to ul/li and set the filter type to Filtered HTML.

Still... I wonder if there's a better solution that would allow full theming? Maybe running the feed through filter_xss() before str_replace-ing the template vars? I suppose that may be best left for a completely different issue...

That aside, its functioning normally for me. Thank you!

jdwfly’s picture

Just realized that I have commit access. Expect the D7 Code to show up soon.

jdwfly’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Fixed

Drupal 7 port has been committed. Please report any issues you find as new issues.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.