Forums

mod_adsmanager_ads.php conflict

jiti 21 Aug, 2008
Hi,

After making the form with wizard if I click on the link. Following error comes


Fatal error: Call to a member function setQuery() on a non-object in /home/savesyou/public_html/desi/modules/mod_adsmanager_ads/mod_adsmanager_ads.php on line 218


Also only 3 plugins are showing in form manager Plugins
Joomla Registration
Profile Page
CB Registration

Is it due to that ? or something else. Please help.
Max_admin 21 Aug, 2008
hi jiti, can you attach this module here ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jiti 22 Aug, 2008
The mod is attached. Pl check.
GreyHead 22 Aug, 2008
Hi Max,

Just wondering if this is some kind of conflict with $database - this is another legacy module that's calling $database as globally defined and CF is defining it locally as a reference to the DBO. Is it worth testing a version of chronocontact.php that uses $db in lines 28 thru 70.

Bob
jiti 22 Aug, 2008
Hi Bob,

Can we use older version with ads module ?

jiti
Max_admin 22 Aug, 2008
Hi Bob,

yes I agree with you, this makes sense, I didn't check the module yet!

Jiti, can you do Bob's suggestion please ? open chronocontact.php and around line 26 find those 3 lines :

jimport( 'joomla.application.component.controller' );
global $mainframe;
$database =& JFactory::getDBO();


start replacing any $database with $CFDB until you reach those 2 lines :
$posted = array();
$posted = $_POST;


if this fixed it please come back with the results!

Regards,

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 23 Aug, 2008
After testing the solution is to open the file which makes the error (in this case mod ad manager) and define the $database like this :

global $database;


just after this line :
 defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );


this is a problem with the mods coding and not ChronoForms!

Best regards,

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jiti 23 Aug, 2008
Thanks Bob and Max,

Your help is really great and very prompt. Actually I was doing R&D myself by uninstalling and trying to install some other version but I messed up whole thing.πŸ™‚

Now the situation is this ::: version3.0 with Beta2 is installed , plugin is installed and also the connectivity but Chrono forms is not showing in administrator/components Once they start showing I'll do the changes as you told. I even can't see it in Installed components although the installation was success by deleting previous directories as told by you in other threads.

Any sugestions ?

Regards,
jiti
Max_admin 23 Aug, 2008
Hi jiti, I guess you tried to add some menu items through the "menu creator" ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jiti 23 Aug, 2008
Hi Max,


I have sent you the information regarding my site in the email to have a look. And also the details to login to Admin section.

Regards,
Jiti
jiti 23 Aug, 2008
You are right. Max I did that. Is that wrong ?
Max_admin 23 Aug, 2008
Hi jiti, not wrong, but when you uninstall the records are not removed and we discovered that this causes the problem you have now, the records created with the menu creator should be carefully removed from the jos_components table (backup table first), we had a post here few days ago with screenshots on how to do this, please look for it and let me know if you can't find it, I will be offline from now, I need to get some sleepπŸ™‚
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jiti 23 Aug, 2008
Thanks Max,

I'll do that. Have a nice nap. You and Bob are of great help.

Regards,
Jiti
jiti 23 Aug, 2008
Chrono forms are now installed and no error after changes done as you told in PHP file. Just this error 404 - Component not found after I created the sample form and clicked the link. Trying to find answer in your forum. :wink:
Max_admin 23 Aug, 2008
Is this a normal form ? no registrations ..etc ? do you get the error when you try to open the form or submit it ? which records did you remove exactly from the database ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jiti 23 Aug, 2008
Hi Max,

I just created a smaple form with 2 fields. WHen I click on the link in Manage forms I get this error. I tried all ways discussed in your forum but to no avail.

If you can login and check yourself ? I have mailed you Admin info.

I deleted the fields which were related to com_chr as told in the snapshots in other thread on your site.

Regards,
jiti
Max_admin 23 Aug, 2008
Hi jiti,

I didn't get any admin info, how did yo you send them ? the PM has only a link to the form!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jiti 23 Aug, 2008
Hi Max,

I had mailed you using this board.

jiti
Max_admin 23 Aug, 2008
Hi jiti,

didn't get that info! only a link to your form!

I will be away for few hours so please get me a screen shot of your jos_components table with all records viewable, tell me if Chronoforms is installed when you do this or not, actually I can't do anything at your admin except viewing the components table using Chronoforms too!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jiti 23 Aug, 2008
Hi Max,

Sure I'll send you the screenshot of Jos_comp and also pm the details of Admin to have a look.

Thanks,
Jiti
jiti 23 Aug, 2008
Hi Max,

Attaching the screen shot here.

Cheers,
Jiti
Max_admin 23 Aug, 2008
Hi Jiti,

Are you sure that those are the only 5 chronoforms records in the table and there is no others ? please check that your joomla_root/components/com_chronocontact folder exists too ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jiti 23 Aug, 2008
Hi Max,

Yes its there. Attaching the com folder. Thanks for your help. I am troubling you too much.

Regards,
jiti
Max_admin 23 Aug, 2008
Hi jiti,

Are you sure that those are the only 5 chronoforms records in the table and there is no others ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jiti 24 Aug, 2008
Hi Max,

Yes I have only these 5 entries in the table. I have checked it again.

Regards,
jiti
Max_admin 24 Aug, 2008
well, last hope, open com_chronocontact folder at the components/com_chronocontact/ and check that there is chronocontact.php there with permissions 644 or higher or even try to make it 775 and see if this fixes it, if it failed then I ran out of ideas, there is something wrong somewhere I can't find!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jiti 24 Aug, 2008
Hi Max,

When you told about chronocontact.php I found the file missing from the folder. It was a shock as I never deleted it. While trying to upload using cute ftp it was not getting uploaded and when uploaded and tried through file manager in server the file was getting deleted. Finally I was able to upload. Check it was the one you told with changes.

jimport( 'joomla.application.component.controller' );

global $mainframe;

$CFDB =& JFactory::getDBO();

$formname = JRequest::getVar( 'chronoformname', '', 'get', 'string', '' );

	if ( !$formname ) {

		$query = "SELECT params FROM #__menu WHERE id='".$_GET['Itemid']."' AND type='component'";

		$CFDB->setQuery( $query );

		$menudata = $CFDB->loadResult();

		if ( $menudata ) {

			$registry = new JRegistry();

			$registry->loadINI( $menudata );

			$configs = $registry->toObject( );

			$formname = $configs->formname;

		}

	}

	$query = "SELECT * FROM #__chrono_contact WHERE name = '$formname'";

	$CFDB->setQuery( $query );

	$rows = $CFDB->loadObjectList();

	$registry = new JRegistry();

	$registry->loadINI( $rows[0]->paramsall );

	$paramsvalues = $registry->toObject( );

	if($paramsvalues->dbconnection == "Yes"){

		eval ("?>".$rows[0]->dbclasses);

	}

	





$posted = array();


But now the same error is coming

Fatal error: Call to a member function setQuery() on a non-object in /home/savesyou/public_html/desi/modules/mod_adsmanager_ads/mod_adsmanager_ads.php on line 218

So back to square one.

For all users. If you get 404 error pl check if chronocontact.php is missing even if you have installed the component properly.

Regards,
jiti
Max_admin 24 Aug, 2008
this error is because of the module doesn't have global $database; add this line and it will fix it!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jiti 25 Aug, 2008
Hi Max,

I did that but same eroor πŸ™‚ . But now no problem as I had to just use one form on this site which I did using some other component. I have installed Chrono on some other site too. It is working fine there and will have to do bit advanced forms on that.

You and Bob were extremely Helpful. I am sure due to such a great help for free that you give, I'll and everyone should buy the license for Chrono forms.

Cheers,
jiti
Max_admin 25 Aug, 2008
Hi jiti,

I'm sure your didn't add global $database; at the correct place, it should be inside the PHP tags and after the first line of code and it WILL work!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jiti 27 Aug, 2008
Hi Max,

Thanks for your support. It was working the first time I implemented change as you told but now it is giving the same error.

Regards,
jiti
qwomg 18 Dec, 2008
Hey

Your topic was the first to come up on google when searching for this error, so I tried everything here and it didnt work,
I started debugging chronocontact.php line by line, and apparently it's the
$registry = new JRegistry();

line that causes the error.

my guess is the ads manager uses $registry variable too, or something like that, and it just crashes, for some reason.

The quick fix: (that worked for me)
Replace all $registry with $registry1 in /components/com_chronocontact/chronocontact.php

Hope this helps
Lior
Max_admin 19 Dec, 2008
thank you for posting this fix!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.