|
ccBoard Forum :: JbCrtUnPublishData |
|
|
|
|
|
Subject :Warning: mysql_fetch_object()..
2009-10-15 20:07:12
|
|
|
| pabloqb |
|
| Beginner |
 |
Joined: 2009-10-15 18:00:30
Posts: 6
Location: |
|
|
|
|
|
Hello!
I was also using the plg_jbcrtunpublishdata12 to automatically archive data after # days.
Installation is ok. But after activate and configure it i get this message
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in my_server\libraries\joomla\database\database\mysql.php on line 462
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in my_server\libraries\joomla\database\database\mysql.php on line 469
I choose 'category'. In the list of categories i choose 1, and in number of daus i choose 13.
By the way... congratulations for this plugin and also the JbPublishDownFp. We have a good combo for newspapers management without using a huge component . What about a auto publish down articles from the from page? That will be awesome! .
Thanks in advance and best regards! |
IP Logged
|
|
Keep in touch |
|
|
|
|
|
|
Subject :Re:Warning: mysql_fetch_object()..
2009-10-15 20:25:44
|
|
|
| polleke |
|
| Super admin |
 |
Joined: 2009-07-15 10:15:55
Posts: 156
Location: Amersfoort, Netherlands |
|
|
|
|
|
Hi Pablo,
in the file : plugins/system/jbcrtunpublishdata.php
there is a line : //echo $query;
Could you remove the slashes. and the run it again.
Can you give the result ?
Does it happen all the time ?
Which version of Joomla do you use ?
can you support me a screendump of the parameters ?
And please the Mysql version
Regards Jan |
IP Logged
|
Kind regards,
Jan |
|
|
|
|
|
|
Subject :Re:Re:Warning: mysql_fetch_object()..
2009-10-15 20:52:48
|
|
|
| pabloqb |
|
| Beginner |
 |
Joined: 2009-10-15 18:00:30
Posts: 6
Location: |
|
|
|
|
|
polleke Wrote on 2009-10-15 20:25:44:
Hi Pablo,
in the file : plugins/system/jbcrtunpublishdata.php
there is a line : //echo $query;
Could you remove the slashes. and the run it again.
Can you give the result ?
update `#__content` set publish_down=DATE_ADD(publish_up , INTERVAL 2 day) WHERE CATID IN (1) and state=1 and publish_down='0000-00-00 00:00:00'
polleke Wrote on 2009-10-15 20:25:44:
Does it happen all the time ?
Yes, it happens
polleke Wrote on 2009-10-15 20:25:44:
Which version of Joomla do you use ?
Joomla! 1.5.14 on xampp under windows vista (sorry i forgot this)
polleke Wrote on 2009-10-15 20:25:44:
can you support me a screendump of the parameters ?
Sure. it goes attached
polleke Wrote on 2009-10-15 20:25:44:
And please the Mysql version
* Server: localhost via TCP/IP
* Version of server: 5.1.30-community
* Character of MySQL: UTF-8 Unicode (utf8)
* Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8
* Client's version: 5.1.30
* extension PHP: mysql
Regards Jan
Regards!
|
IP Logged
|
|
Keep in touch |
|
|
|
|
|
|
Subject :Re:Warning: mysql_fetch_object()..
2009-10-15 21:00:29
|
|
|
| polleke |
|
| Super admin |
 |
Joined: 2009-07-15 10:15:55
Posts: 156
Location: Amersfoort, Netherlands |
|
|
|
|
|
Hi Pablo,
thanks for the information, but there is nothing chocking.
Can you you try the sql result directly on the database ?
so :
update `#__content` set publish_down=DATE_ADD(publish_up , INTERVAL 2 day) WHERE CATID IN (1) and state=1 and publish_down='0000-00-00 00:00:00'
Where #_ should be replaced by the table-prefix you use.
Is there an error message ?
Jan |
IP Logged
|
Kind regards,
Jan |
|
|
|
|
|
|
Subject :Re:Warning: mysql_fetch_object()..
2009-10-15 21:21:57
|
|
|
| polleke |
|
| Super admin |
 |
Joined: 2009-07-15 10:15:55
Posts: 156
Location: Amersfoort, Netherlands |
|
|
|
|
|
Hi Pablo,
I do not beleive this problem is caused by this plugin.
I have the same message on a system which has this plugin not installed.
And i did tested the plugin on an other site it works fien there (i also get the message there).
You could turn the reporting from Maximum to systemdefaults. And dubugging to off.
Jan |
IP Logged
|
Kind regards,
Jan |
|
|
|
|
|
|
Subject :Re:Warning: mysql_fetch_object()..
2009-10-15 21:23:00
|
|
|
| pabloqb |
|
| Beginner |
 |
Joined: 2009-10-15 18:00:30
Posts: 6
Location: |
|
|
|
|
|
Indeed, nothing happens using the SQL directly on MySQL server via phpMyAdmin 
Checking the rows that will be affected
select * from `jos_content` WHERE CATID IN (1) and state=1 and publish_down='0000-00-00 00:00:00'
i get 0 results. That has sense as the script should update the articles, hasnt it?
I have added a new article without publish_down date and after save it and looking into the database, it has the publish_down date 2 days after. So the plugin is working well.
I'm missing at this point |
IP Logged
|
|
Keep in touch |
|
|
|
|
|
|
Subject :Re:Warning: mysql_fetch_object()..
2009-10-15 21:27:35
|
|
|
| polleke |
|
| Super admin |
 |
Joined: 2009-07-15 10:15:55
Posts: 156
Location: Amersfoort, Netherlands |
|
|
|
|
|
Hi Pablo,
for the moment i am glad it working fine.
I wil have a look at this Joomla php script to see what causes the fault.
I let you know.
Jan |
IP Logged
|
Kind regards,
Jan |
|
|
|
|
|
|
Subject :Re:Warning: mysql_fetch_object()..
2009-10-15 22:07:28
|
|
|
| pabloqb |
|
| Beginner |
 |
Joined: 2009-10-15 18:00:30
Posts: 6
Location: |
|
|
|
|
|
Hello,
do you really need this line?
$rows = $db->loadObjectList(); (about line 47)
Because if you comment it, the warning disappear. What does the loadObjectList() does? Shouldn't be used with select queries? Update does not get back rows, doesnt it?.
I hope this help.
Best regards! |
IP Logged
|
|
Keep in touch |
|
|
|
|
|
|
Subject :Re:Warning: mysql_fetch_object()..
2009-10-15 22:12:38
|
|
|
| polleke |
|
| Super admin |
 |
Joined: 2009-07-15 10:15:55
Posts: 156
Location: Amersfoort, Netherlands |
|
|
|
|
|
Hi ablo,
nice tip i wil work on it.
Jan |
IP Logged
|
Kind regards,
Jan |
|
|
|
|
|
|
Subject :Re:Warning: mysql_fetch_object()..
2009-10-15 22:20:49
|
|
|
| polleke |
|
| Super admin |
 |
Joined: 2009-07-15 10:15:55
Posts: 156
Location: Amersfoort, Netherlands |
|
|
|
|
|
Hi Pablo,
great tip, it works fine for me. Could you test the attached php-script.
Just override the old one (after backup).
Jan
|
IP Logged
|
Kind regards,
Jan |
|
|
|
|
|
|
Subject :Re:Warning: mysql_fetch_object()..
2009-10-15 23:55:49
|
|
|
| pabloqb |
|
| Beginner |
 |
Joined: 2009-10-15 18:00:30
Posts: 6
Location: |
|
|
|
|
|
Hi there,
i get a Restricted access message when i try download the file.
Could you attach the script again?
Thanks in advance.
Regards! |
IP Logged
|
|
Keep in touch |
|
|
|
|
|
|
Subject :Re:Warning: mysql_fetch_object()..
2009-10-16 11:17:21
|
|
|
| polleke |
|
| Super admin |
 |
Joined: 2009-07-15 10:15:55
Posts: 156
Location: Amersfoort, Netherlands |
|
|
|
|
|
Hi Pablo,
i changed the files extension. So now you can download the file. I also send you the correct file.
Jan |
IP Logged
|
Kind regards,
Jan |
|
|
|
|
|
|
Subject :Re:Warning: mysql_fetch_object()..
2009-10-16 11:48:10
|
|
|
| pabloqb |
|
| Beginner |
 |
Joined: 2009-10-15 18:00:30
Posts: 6
Location: |
|
|
|
|
|
Yeah! it's working right now 
hehe, it's always better ask in the code what is happening 
Happy to help.
Best Regards! |
IP Logged
|
|
Keep in touch |
|
|
|
|