After updating to the latest dev I get the following error:

Notice: Trying to get property of non-object in idealui_merchant_list() (regel 124 van /home/p20793/domains/woesteland.nl/public_html/spelen/sites/all/modules/ideal/idealui/includes/idealui.admin.inc).

in admin/config/services/ideal

CommentFileSizeAuthor
#15 idealubercart_1309652_00.patch1.35 KBxano

Comments

xano’s picture

Can you check all merchants to see if the acquirers they use still exist?

xano’s picture

Status: Active » Postponed (maintainer needs more info)

Also, can you put the following code at the end of line 117 of /sites/all/modules/ideal/idealui/includes/idealui.admin.inc, reload the page and paste the output here?
Code:
print_r(entity_load('ideal_merchant'));exit;

Afterwards, you can simply remove this piece of code again.

grootte’s picture

Status: Postponed (maintainer needs more info) » Active

Array ( [1] => iDEALMerchant Object ( [acquirer] => [iaid] => 1 [imid] => 1 [locked] => 1 [merchant_id] => 123456789 [public_certificate_path] => ./sites/all/modules/ideal/ideal/encryption/ideal.private.idealsimulatorpaz.cer [private_key_password] => Password [private_key_path] => ./sites/all/modules/ideal/ideal/encryption/ideal.private.idealsimulatorpaz.key [sub_id] => 0 [title] => iDEAL Simulator Professional/Advanced/Zelfbouw [rdf_mapping] => Array ( ) ) )

grootte’s picture

iDEAL Simulator Professional/Advanced/Zelfbouw has no acquirerer after the update, don't know how it was before.

xano’s picture

Thank you for the information. Unfortunately, I have not been able to reproduce this error locally. Can you provide step-by-step instructions on how to reproduce this bug using a fresh installation of Drupal 7.x-dev and specific iDEAL versions?

xano’s picture

Status: Active » Postponed (maintainer needs more info)
xano’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing issue because of lack of response.

lendude’s picture

Component: Code » Miscellaneous
Status: Closed (cannot reproduce) » Needs review

I had the same problem. Related problem in idealdonation:
Fatal error: Call to a member function issuers() on a non-object in sites/all/modules/contributed/ideal/ideal/includes/ideal.transaction.inc on line 820

The problem is that iDEALMerchant::__construct() gets called before PDO has loaded the variables into the object as if setFetchMode() was called with PDO::FETCH_PROPS_LATE (entity.controller.inc line 154). iDEALMerchant::__construct() then checks if $this->iaid has been set (it hasn't) and then doesn't load the iDEALAcquirer object into $this->acquirer.

This appears to be a problem in PHP/PDO. Switching my PHP version from 5.2.13 to 5.3.2 fixes the problem. No idea what the problem in PHP/PDO would be or which versions would have this problem, but that's what causing this error.

Since the query build is done by the entity module, this doesn't seem like something that can be fixed in the ideal module (if it can be fixed in the code at all). All that I can suggest is some error handling if iDEALAcquirer can't be loaded by iDEALMerchant.

xano’s picture

That may explain my inability to reproduce the problem, since I'm running PHP 5.3.x.

xano’s picture

Status: Needs review » Closed (cannot reproduce)

I haven't been able to reproduce the problem with PHP 5.3 or 5.4 yet, and since PHP 5.2 hasn't been supported for a long time, I'm closing this issue.

If you have a fix for this issue, feel free to reopen this issue and we'll evaluate and hopefully commit the fix. Otherwise, the solution is to upgrade to a more recent version of PHP that is still supported.

jawi’s picture

Priority: Minor » Major
Status: Closed (cannot reproduce) » Active

Did a clean install of the latest dev version today (7.x-2.x-dev | 2012-Sep-19).

Notice: Trying to get property of non-object in idealubercart_transaction_form_access() (regel 142 van
/home/~~~/public_html/sites/all/modules/idealubercart/idealubercart.module).

Using php 5.3.10 - the issue is still there.

xano’s picture

Priority: Major » Minor
Status: Active » Closed (cannot reproduce)

The error you are seeing is unrelated to this particular issue, as it is about an Ubercart order object rather than an iDEALMerchant object.

Alejandrit0’s picture

Title: Trying to get property of non-object in idealui_merchant_list() » Notice: Trying to get property of non-object in idealubercart_transaction_form_access() (regel 142)
Category: bug » feature
Status: Closed (cannot reproduce) » Needs work

In response to the issue of @Jawi

I had the same issue. The error throws in the case a client is placing an order, but cancels just before the final step, and deletes all items. A function in idealubercart.module, idealubercart_transaction_form_access() (at about 140), tries to identify any open order that could be paid by ideal. It works great, but in this particular case the session variable does not return an order object, but just bool false.

The minor fix below was a solution for me, could this be added to the next release of idealubercart or should it be fixed elsewhere?

/**
 * Implements menu access callback.
 */
function idealubercart_transaction_form_access() {
  // Make sure an order exists.
  if (isset($_SESSION['cart_order'])) {
    $uc_order = uc_order_load($_SESSION['cart_order']);
    // Make sure the order's payment method is one defined by this module.
	if( $uc_order !== false ){
    	return substr($uc_order->payment_method, 0, 14) == 'idealubercart_';
	}else{
		return FALSE;
	}
  }
  return FALSE;
}
jawi’s picture

Thanks for sharing!

xano’s picture

Assigned: Unassigned » xano
Status: Needs work » Needs review
StatusFileSize
new1.35 KB
xano’s picture

Project: iDEAL » iDEAL For Ubercart
Version: 7.x-2.x-dev » 7.x-1.x-dev
Component: Miscellaneous » Code
Category: feature » bug
xano’s picture

Title: Notice: Trying to get property of non-object in idealubercart_transaction_form_access() (regel 142) » Trying to get property of non-object in idealui_merchant_list()
Project: iDEAL For Ubercart » iDEAL
Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Needs review » Closed (cannot reproduce)

Comments #11 through #16 were about an unrelated issue. The fix is posted in #1887592: Unknown order in transaction form and discussion will continue in that issue as well.

Please keep this issue for discussion about the original issue, which is about a bug with iDEALMerchant objects.

Closing this issue, because the original bug cannot be reproduced.

xano’s picture

Assigned: xano » Unassigned