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.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | syndication.module.txt | 11.55 KB | sheldon rampton |
Comments
Comment #1
andremolnar commentedLooking into it.
Comment #2
andremolnar commentedI'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
Comment #3
ribbo commentedAndre,
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
Comment #4
andremolnar commentedLet me know if either issue is resolved with the latest update.
andre
Comment #5
ribbo commentedhi 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
Comment #6
ribbo commentedhi 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
Comment #7
andremolnar commentedOkay,
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
Comment #8
Carlos Miranda Levy commentedI´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).
Comment #9
sheldon rampton commentedI'm getting the same error also.
Comment #10
sheldon rampton commentedI 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.
Comment #11
andremolnar commentedSheldon,
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
Comment #12
andremolnar commentedHey 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
Comment #13
andremolnar commentedI'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
Comment #14
ribbo commentedThanks 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.
Comment #15
andremolnar commentedribbo,
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
Comment #16
ribbo commentedyep, saw that later. thanks
Comment #17
(not verified) commentedComment #18
solona commentedThis 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.
Comment #19
metaprinter commentedwarning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'phptemplate_links' was given in /here/there/mySite.com/includes/theme.inc on line 656.
I set my WEBFORM permissions like teremka said and the error went away... strange that it the warning just started being thrown, as the site this was on hadn't been touched in months!
Comment #20
shv_rk commentedhello,
I am relatively new to drupal and having the same error.
May I ask where/how did you set your WEBFORM permissions?
thx