By manuj_78 on
Hi ,
Can anyone please develop or upgrade the exising news page module for drupal 4.7 please as the existing maintainers dont seem to be doing any development and are not replying to any issues as well.
Manuj
Hi ,
Can anyone please develop or upgrade the exising news page module for drupal 4.7 please as the existing maintainers dont seem to be doing any development and are not replying to any issues as well.
Manuj
Comments
module patched
If you apply the patch that I posted here http://drupal.org/node/80929 the module works fine. What are your needs? If they fit in with mine, I might work on it (can't promise anything).
-) efolia (-
SQL errors
Hi mate,
Sorry for not replying earlier.
I was getting wierd sql errors with drupal 4.7.2 when news_page was enabled. After upgrading to 4.7.3 I had not tried the news_page module untill today after seeing your message
After enabling the news_page module I noticed that ,in the news_page block , formatting code is also being displayed. For example, it shows
<b>High alert in Delhi after M'rashtra blasts</b>in the block rather than only showing "High alert in Delhi after M'rashtra blasts"The sql errors generally occured after the cron ran, so I shall know that in about 6 hours and will let you know the results of the same but in the meantime please tell me how to fix the formatting issue mentioned above
Manuj
SQL errors
The SQL errors are caused by Drupal's native aggregator module, not by News Page. I get the same thing at each CRON, but since the errors seem to have no consequence, i didnt even care to look into it (yet). News page only reads the data from the aggregator table and the queries are correct. The only SQL table that NP deals directly with is minimal and limited to storing the page definitions (title, keywords, etc.).
To remove the HTML formatting from the feeds, go Administer > Settings > Aggregator and remove all the codes from the list that the module allows in.
-) efolia (-
I dont want to remove formatting
Hi mate,
I dont want to remove the formatting...just that the formatting code is visible in the block to the user. You can have a look by going to my website www.delhilive.com and you will see in delhi newsbot block that the html tags code is also visible with the news.
2nd I was aggregating news earlier as well from a lot of news sources to my site but only when i enable the news page module i start getting the errors. On this cron run, i got these following sql errors
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT DISTINCT(p.perm) FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /home/delhiliv/public_html/includes/database.mysql.inc on line 120.
implode(): Bad arguments. in /home/delhiliv/public_html/modules/user.module on line 351.
array_keys(): The first argument should be an array in /home/delhiliv/public_html/modules/user.module on line 351.
Any suggestions?
Manuj
I see what you mean. Well
I see what you mean. Well it's an encoding error in the original feed :
&lt;b&gt;Nothing much you can do to filter out third party encoding problems, since there's so many possible mistakes they can do. In this case the string got encoded twice. The code from the source looks like this:
<b><b>High alert in Delhi after M'rashtra blasts</b></b><br><br>Doubling tags is ignored by a browser but it screws up RSS feeds. Correcting this would be like trying to correct each and every grammar mistake automatically.
The SQL errors have to do with role settings. I have no idea why NP would be triggering anything like that since it does not deal with scheduled tasks or aggregation at all. The details of the error message will tell you which module is responsible (just click on it to get to the details).
Cheers
-) efolia (-
Multiple problems
It seems even after cron run the Delhi Newsbot block is not updating and if I try and do a manual update , it gives me an error The RSS-feed from Delhi NewsBot seems to be broken, because of error "403 ". even though I am the admin. My access control has access news page and access news pag feed enabled
regarding the sql errors - here is the complete log for the 3 sql errors i get whenever a cron is run
Type php
Date Saturday, September 9, 2006 - 06:49
User Guest
Location http://www.delhilive.com/event/2006/09/09/ical/all/all/
Referrer
Message You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT DISTINCT(p.perm) FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /home/delhiliv/public_html/includes/database.mysql.inc on line 120.
Severity error
Type php
Date Saturday, September 9, 2006 - 06:49
User Guest
Location http://www.delhilive.com/event/2006/09/09/ical/all/all/
Referrer
Message implode(): Bad arguments. in /home/delhiliv/public_html/modules/user.module on line 351.
Severity error
Type php
Date Saturday, September 9, 2006 - 06:49
User Guest
Location http://www.delhilive.com/event/2006/09/09/ical/all/all/
Referrer
Message array_keys(): The first argument should be an array in /home/delhiliv/public_html/modules/user.module on line 351.
Severity error
Though all the locations for the messages appear in event, I dont know why these errors occur when news page is enabled.
Manuj
I'm sorry, I am not familar
I'm sorry, I am not familar with the Event/iCal module at all. These errors are generated by some event in iCal.
To know for sure that News Page is somehow responsible for this series of errors, update one of your feed source manually (through Administer > Aggregator): that should trigger the 3 errors. Then use an FTP client to delete (or move out of the modules folder) the news_page folder, and do the manual update again and see if the errors show up. If you update manually, the admin journal should show a different *Location* for the errors. (Make sure you're using the latest, patched version of NewsPage)
Good luck. :-)
-) efolia (-
I tried your suggestion and
I tried your suggestion and did manual update but i dont get the errors when i do a manual update.
Please clarify your suggestion of moving the news_page to a different folder as if i move it out of the modules folder then the modules page under admin doesnt show the news_page module in the list i.e. it gets disabled.
Also the news_page module I am using is dated 1st july 07.
Manuj
I'm not much of a wizard
I'm not much of a wizard when it comes to server stuff, but obviously the errors you're getting have to do with some permision settings in CRON. Since you're running CRON tasks through iCal (as far as I can gather), my guess is that it's trying to run under a role that has no access right to run the tasks. I doubt that it could be triggered by News Page, since the module doesnt do anything with CRON or even getting the feeds.
The idea of moving NP out of the modules folder is to wait and see if it really is responsible for the errors: if the errors dont show up at the next CRON run while NP is out of the way, then it really is a NP-related problem.
Well you're running the latest version, but you should patch it (see the link in my first comment in this thread). You can apply the patch manually, since it only involves adding 7 characthers. If you're doing any keyword filtering, you really should, since the unpatched version will not return results for some important words (such as *delhi* for example ;-)
-) efolia (-
Ill try and apply your patch
Ill try and apply your patch today.
Regarding moving News_page out of the folder. If I move it out of the folder or when it is disabled I do not get the sql errors. Only when the news_page module is enabled I start getting the sql errors. So i beleive it might be a news_page module problem.
Another user has pointed a similar problem after installing news_page module.
The link for that post is http://drupal.org/node/83424
Manuj
patch...
Try the following:
Open news_page.module, find the following code (line 91) and insert the line that ends with *// changed*. It does nothing except return a null object (which was expected in Drupal 4.6 when this module was written) from the value (false) that 4.7 now returns.
It should solve your problem. If so, let me know and I'll post a patch in its own thread.
Cheers,
-) efolia (-
efolia, I have just applied
efolia,
I have just applied the code and will let you know the results soon
Manuj
Nope..Still getting the sql
Nope..Still getting the sql errors
Efolia I did reply to the
Efolia
I did reply to the parent of this post that your fix is not working. I hope you got the message
Manuj
i'll look into it when i can
I tried: the last patch did solve the error message I was getting from the module, so I thought it would solve yours too. Since I cannot reproduce your errors here, I'm not so sure I can solve it. I'll look further when I have time... the error must come from the same function that was patched last.
-) efolia (-
efolia, this patch is not
efolia,
this patch is not working and having loads of sql errors. can you please look into this.
Manuj
That's not correct
It needs to be
if ( $account === FALSE ) { $account = NULL; }
Three equals signs, not one. One is assignment, not comparison!
'cvs' version is for Drupal 4.7
'cvs' version is for Drupal 4.7.
I have it running happily on a few clients sites.
There is ONE issue open (from about a week ago) for this version, which effects filtering on words with accented characters - efolia has provided a patch to fix that which I'll soon be testing and hopefuly commiting.
I haven't released this as a 4.7 version yet because I like to leave it as csv for a few weeks so it can be tested by other developers, and we can identify and squash any remaining bugs.
Cortext Communications
Drupal Themes & Modules
------------------------------------------
Drupal Specialists: Consulting, Development & Training
Robert Castelo, CTO
Code Positive
London, United Kingdom
----
CVS
As I mentionned, the module does everything that it needs to do and it works just fine on 4.7x. It's easy to theme, flexible, simple to use (I can define a news page in 3 minutes) and the code is neat. The only things I'd like to see added (or add myself eventually) is (1) more extensive filtering options, including the ability to use PHP to perform additional filtering, and (2) the ability to define news blocks as well. My site has a lot of different news pages based on combinations of aggregator feeds and it works perfectly. It's probably the easiest way for a Drupal site to both add tightly targeted content and optimize search engine visibility. Thanks, Robert :-)
-) efolia (-
Roberto or efolia, can
Roberto or efolia,
can someone please please look into fixing these sql errors please.
Manuj
re: sneaking suspicion
Hi there,
I might just be totally out in left field, but which version of PHP does your server run? PHP5 is a lot more picky about whether or not arrays are being fed into most of the array functions, and not strings. That may also be the reason why this error is appearing on your site, and not on other people's websites.
My suspicion is that these errors are of the cascading type, and if you figure out which line of code in the publishing module is assuming an array, you may find that it is not being fed an array properly in PHP5.
Dave
Dave, A friend a has done
Dave,
A friend a has done some changes in the news_page module for me and I am testing it at the moment in my server. Once I am sure I am not getting any more errors I will post it in the thread.
There was a bug in the code, which hopefully has been sorted.
Manuj
Please find the fix for the
Please find the fix for the problems at http://drupal.org/node/83414#comment-152074