[function.call-user-func-array] - error when accessing /syndicate
| Project: | Syndication |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Full error message when accessing example.com/syndicate
warning: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, 'syndication_users' was given in /home/ribbo/public_html/sos/tscimbizo/includes/form.inc on line 218.
another error when accessing /admin/content/syndication
user warning: Table 'ribbo_tscimbizo.view_view' doesn't exist query: SELECT v.vid, v.page_title, v.url FROM view_view v LEFT JOIN view_argument arg ON arg.vid = v.vid WHERE arg.type = 'rss_feed' in /home/ribbo/public_html/sos/tscimbizo/includes/database.mysql.inc on line 172.
The rss feeds are available however.
I am using Syndicate 5.x-1.x-dev released on 2007-Apr-29, with Drupal 5 and php 4.4.4 and mysql 4.1.21-standard
I am not able to thin clearly about this at the moment, please let me know if you have ideas.

#1
Looking into it.
#2
I've commited a fix for the second problem. I wasn't testing to make sure that the user had views enabled before querying against the views tables for the admin settings (the tests were only there for the syndication page).
I'm not sure what is causing the first problem. Looks to be something related to user blogs perhaps. You'll need to be my eyes and hands on this one because I don't have user blogs generating feeds. If you can provide more information that would be great.
Fix to problem 2 should be available when the next tar-ball is generated. Or you can get it from the DRUPAL-5 branch in cvs contrib - it is checked in.
andre
#3
Andre,
Sorry for only replying now - its been a busy week. Please let me know what you would like me to do and I will get the results to you asap.
I have not, tested your new code - thats my next step.
Riaan
#4
Let me know if either issue is resolved with the latest update.
andre
#5
hi Andre
The latest version of Syndicate did resolve the second error. The first continues. I do have user blogs and have syndicate enabled. The error also appears when I have syndication disabled for all three categories (image galleries, newsletters and content types) interestingly there is then still a feed for user blogs.
Thanks
Riaan
#6
hi Andre
The latest version of Syndicate did resolve the second error. The first continues. I do have user blogs and have syndicate enabled. The error also appears when I have syndication disabled for all three categories (image galleries, newsletters and content types) interestingly there is then still a feed for user blogs.
Thanks
Riaan
#7
Okay,
I will have to look at the section of code that deals with user blogs. And it looks like there needs to be a setting to choose which blogs show up in syndication... since it doesn't look like there is such a choice now. I'm not intimately familiar with the blog module - but here's my chance to learn.
Stay tuned.
andre
#8
I´m getting the same error...
http://www.ciudadesvirtuales.com/syndication
Latest official releases of Drupal and Syndication module as of today (Drupal 5.1 and Syndication 5.x-1.x-dev -May 2).
#9
I'm getting the same error also.
#10
I think I've identified the source of the problem: "drupal_get_form() now takes a $form_id, not a $form," so "Forms must be created in dedicated builder functions":
http://drupal.org/node/64279#drupal-get-form
Currently the syndication_blogs() function is trying to create a form on the fly rather than calling a separate dedicated builder function to do so. I got the error message to go away by creating a separate form builder function named syndication_users, as follows:
function syndication_users() {
if(module_exists('atom')) {
$prefix = '
'. t("At %sn, all users have a %rss and %atom feed for their blog, as well as each individual user.", array ('%sn' => variable_get('site_name', 'Drupal'), '%rss' => l(t('RSS'), 'blog/feed'), '%atom' => l(t('Atom'), 'blog/atom/feed'))). '
';
} else {
$prefix = '
'. t('At %sn, %all and each user, have an RSS feed for their blog.', array ('%sn' => variable_get('site_name', 'Drupal'), '%all' => l(t('all users'), 'blog/feed'))). '
';
}
$form['name'] = array('#type' => 'textfield',
'#title' => t('Search users'),
'#prefix' => $prefix,
'#description' => t('Enter a username to view her blog feed, and other details.'));
$form['submit'] = array('#type' => 'button', '#value' => t('Search'));
return $form;
}
Instead of creating the form array internally, therefore, the syndication_blogs() function simply calls drupal_get_form as follows:
$output .= drupal_get_form('syndication_users');
Also, form element naming has changed:
http://drupal.org/node/64279#comment-196217
As a result, the line which currently reads
if ($name = $_POST['edit']['name']) {
should be changed to:
if ($name = $_POST['name']) {
I'm attaching a copy of syndication.module with my revisions (and with the .txt extension added so drupal.org will let me attach it). I know the proper way to do this is to just send a patch, but somehow I always seem to screw those up.
#11
Sheldon,
Thanks for the follow up on the issue. I'm reviewing this now. In the future can you try to provide a patch (vs the full patched module)?
andre
#12
Hey folks.
As I mentioned before, I'd never implemented syndication on blog posts and was new to this module when helping to port it to 5.x.
Sheldon's patch does fix the error issue - but I'm curious about how everyone feels about the functionality. i.e. currently not having an admin interface to choose which blog feeds get listed on the syndication page (as with views and categories). I'm also not sure about the search feature for user feeds - but that too can become an admin option (provide search form or not).
I could do the work to make that happen tomorrow - I would just like some feedback.
I'd like to commit something to at least deal with the errors.
andre
#13
I've committed the changes as is, since there wasn't feedback on the functionality. I may still provide a few admin options, but for now lets make the module at least functional. Thanks again Sheldon.
andre
#14
Thanks Andre and Sheldon. Just in time, the site I am working on needs to go live end of this month.
I will install and test this module tomorrow. Andre, w.r.t. the configuration functionality, I personally do not need it but other sites with more than one user blog may choose to limit syndication to some users only. Perhaps Syndication in terms of taxonomy terms may be useful?
Again, thanks Sheldon and Andre.
#15
ribbo,
That functionality is there - any taxonomy page that generates a feed can be added to this syndication page via the admin page for the module.
andre
#16
yep, saw that later. thanks
#17
#18
This error came up for me when using Webform, but only when not logged in as admin. Turned out it was a permissions problem. Just wanted to mention that in case anyone else got this error using webform and not another module like syndication. Make sure your permissions are set to anonymous and/or authenticated and any other users who can view the form.