Payment Integration

#1

I am actually trying to install a payment extension for my store (paystack). And i realized that after installing the extension via composer and in the /var/www/html directory, the save config literally stop working in the magento admin (Store -> Configuration -> Sales -> Payment method). What could be the reason for this?

0 Likes

#2

Hey,

Typically, you would install an extensions via composer or by uploading to /var/www/html - Not both.

  • Is the module you have install definately compatible with Magento 2.3.1? I’m noticing that a lot of companies who made extensions a long time ago haven’t bothered to maintain them.
  • Do you clear cache after install?
  • Did you recompile Magento after install? (Production Mode only)
0 Likes

#3

Hi Craig, I did all these! Installed the extension via composer - Yes
The Company says it is compatible with magento 2.3.1
I did clear cache after install
And also did recompile magento after install

Below is the order of command execution:

  1. composer require pstk/paystack-magento2-module
  2. php bin/magento module:enable Pstk_Paystack --clear-static-content
  3. php bin/magento setup:upgrade
  4. php bin/magento setup:di:compile

What could be the issue. The extension developer is saying it has to do with my folder permission, and been looking online for people with similar issues, and have not found any usable leads.

0 Likes

#4

What do the error logs say?

  1. Recreate the error (make a note of the time)
  2. Open the following files
    var/system.log
    var/exception.log
  3. Check the error message at the corresponding timestamps
0 Likes

#5

Will do just that. So i noticed that the Save Config button does not work even without the extension installed. This definitely has to do with my Magento installation. Even when i tried configuring other payment methods.

0 Likes

#6

Got this in system.log

[2019-05-07 15:16:03] main.INFO: Broken reference: the 'global_notices' element cannot be added as child to 'global.notices', because the latter doesn't exist [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'logo' element cannot be added as child to 'header', because the latter doesn't exist [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'global.search' element cannot be added as child to 'header', because the latter doesn't exist [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'user' element cannot be added as child to 'header', because the latter doesn't exist [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'menu' element cannot be added as child to 'page.menu', because the latter doesn't exist [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'breadcrumbs' element cannot be added as child to 'page.breadcrumbs', because the latter doesn't exist [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'formkey' element cannot be added as child to 'page.formkey', because the latter doesn't exist [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'page.title' element cannot be added as child to 'main.top', because the latter doesn't exist [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'messages' element cannot be added as child to 'page.messages', because the latter doesn't exist [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'page.actions.toolbar' element cannot be added as child to 'page.main.actions', because the latter doesn't exist [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'legal' element cannot be added as child to 'footer', because the latter doesn't exist [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'notification_area' element cannot be added as child to 'notifications', because the latter doesn't exist [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'unread_system_messages' element cannot be added as child to 'notifications', because the latter doesn't exist [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'notification_window' element cannot be added as child to 'notifications', because the latter doesn't exist [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'notification.messages' element cannot be added as child to 'header', because the latter doesn't exist [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'header.inner.left' element cannot be added as child to 'header', because the latter doesn't exist [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'header.inner.right' element cannot be added as child to 'header', because the latter doesn't exist [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'logo' tries to reorder itself towards '', but their parents are different: 'header' and '' respectively. [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'global.search' tries to reorder itself towards 'logo', but their parents are different: 'header' and '' respectively. [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'user' tries to reorder itself towards '', but their parents are different: 'header' and '' respectively. [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'page.actions.toolbar' tries to reorder itself towards '', but their parents are different: 'page.main.actions' and '' respectively. [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'notification.messages' tries to reorder itself towards 'user', but their parents are different: 'header' and '' respectively. [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'header.inner.left' tries to reorder itself towards '', but their parents are different: 'header' and '' respectively. [] []
[2019-05-07 15:16:03] main.INFO: Broken reference: the 'header.inner.right' tries to reorder itself towards 'header.inner.left', but their parents are different: 'header' and '' respectively. [] []
[2019-05-07 15:16:04] main.INFO: Consumer "async.operations.all" skipped as required connection "amqp" is not configured. Unknown connection name amqp [] []
[2019-05-07 15:17:03] main.INFO: Consumer "async.operations.all" skipped as required connection "amqp" is not configured. Unknown connection name amqp [] []
[2019-05-07 15:18:03] main.INFO: Consumer "async.operations.all" skipped as required connection "amqp" is not configured. Unknown connection name amqp [] []
[2019-05-07 15:19:03] main.INFO: Consumer "async.operations.all" skipped as required connection "amqp" is not configured. Unknown connection name amqp [] []
[2019-05-07 15:20:03] main.INFO: Consumer "async.operations.all" skipped as required connection "amqp" is not configured. Unknown connection name amqp [] []
[2019-05-07 15:21:03] main.INFO: Consumer "async.operations.all" skipped as required connection "amqp" is not configured. Unknown connection name amqp [] []
[2019-05-07 15:22:03] main.INFO: Consumer "async.operations.all" skipped as required connection "amqp" is not configured. Unknown connection name amqp [] []
[2019-05-07 15:23:03] main.INFO: Consumer "async.operations.all" skipped as required connection "amqp" is not configured. Unknown connection name amqp [] []
[2019-05-07 15:24:03] main.INFO: Consumer "async.operations.all" skipped as required connection "amqp" is not configured. Unknown connection name amqp [] []

And this i got in exception.log

[2019-05-05 20:36:54] main.CRITICAL: The product that was requested doesn't exist. Verify the product and try again. {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): The product that was requested doesn't exist. Verify the product and try again. at /var/www/html/vendor/magento/module-catalog/Model/ProductRepository.php:290)"} []
[2019-05-05 20:37:02] main.CRITICAL: The product that was requested doesn't exist. Verify the product and try again. {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): The product that was requested doesn't exist. Verify the product and try again. at /var/www/html/vendor/magento/module-catalog/Model/ProductRepository.php:290)"} []
[2019-05-05 20:37:10] main.CRITICAL: The product that was requested doesn't exist. Verify the product and try again. {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): The product that was requested doesn't exist. Verify the product and try again. at /var/www/html/vendor/magento/module-catalog/Model/ProductRepository.php:290)"} []
[2019-05-05 20:37:14] main.CRITICAL: The product that was requested doesn't exist. Verify the product and try again. {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): The product that was requested doesn't exist. Verify the product and try again. at /var/www/html/vendor/magento/module-catalog/Model/ProductRepository.php:290)"} []
[2019-05-05 20:37:17] main.CRITICAL: The product that was requested doesn't exist. Verify the product and try again. {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): The product that was requested doesn't exist. Verify the product and try again. at /var/www/html/vendor/magento/module-catalog/Model/ProductRepository.php:290)"} []
[2019-05-06 01:50:28] main.CRITICAL: The product that was requested doesn't exist. Verify the product and try again. {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): The product that was requested doesn't exist. Verify the product and try again. at /var/www/html/vendor/magento/module-catalog/Model/ProductRepository.php:290)"} []
[2019-05-06 01:52:17] main.CRITICAL: The product that was requested doesn't exist. Verify the product and try again. {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): The product that was requested doesn't exist. Verify the product and try again. at /var/www/html/vendor/magento/module-catalog/Model/ProductRepository.php:290)"} []
[2019-05-06 01:52:23] main.CRITICAL: The product that was requested doesn't exist. Verify the product and try again. {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): The product that was requested doesn't exist. Verify the product and try again. at /var/www/html/vendor/magento/module-catalog/Model/ProductRepository.php:290)"} []
0 Likes

#8

I quickly Googled relevant segments from your log:

main.INFO: Broken reference: the ‘global_notices’ element cannot be added as child to ‘global.notices’, because the latter doesn’t exist

main.CRITICAL: The product that was requested doesn’t exist. Verify the product and try again. {“exception”:"[object] (Magento\Framework\Exception\NoSuchEntityException(code: 0): The product that was requested doesn’t exist.

Verify the product and try again. at /var/www/html/vendor/magento/module-catalog/Model/ProductRepository.php:290

I found a similar error on Google to the one in your system.log. It suggests that you reset your file permissions. Basically, it suggests that you trying going through this post: How to diagnose and fix Ownerships and Permission issues

There was also a suggestion to check your PHP log. Check the timestamps to the time of the error as you did before. The location of this file requires root to access it and varies based on your setup. Mine is found in /var/log/apache2/error.log

0 Likes

#9

Hey Craig,

Thanks for the help so far! So i checked for file permission issues and noticed that that some folders had the wrong user… Used the guide you sent to fix it.But i also noticed that my Permissions had a + sign. Totally don’t know what that means.


I also checked the user that ran Cron task, The user (magento) ran it. I have go back to my magento admin to see if i can save config, but still i can’t. What i’m i doing wrong?

Thanks

0 Likes

#10

I’ve never seen the “+” at the end of the permissions before. It’s a hard thing to Google.

So, it seems obvious that the button isn’t working due to the fact that the page doesn’t finish rendering do to an error. I would see what the Chrome Console says about it.

In Chrome, go into Inspect Element Mode (F12) and click on the Console Tab. Then reload the Configuration Page. You’ll most likely see some error appear here. Attempt to understand the basics of what’s being said and see where Google takes you.

It might also be worth checking the Network tab for any files that aren’t getting loaded. They’ll be highlighted in Red text. Just sort by “Status” to group them together.

0 Likes

#11

Hi Craig,

It definitely was a broken javascript. So had to google the error message in the Chrome Console and found this fix (Ref):

File: vendor/amzn/amazon-pay-and-login-with-amazon-core-module/Model/Config/SimplePath.php

Replace Line: 487
'merchantStoreDescription' => $this->getConfig('general/store_information/name'),

with:
'merchantStoreDescription' => htmlspecialchars($this->getConfig('general/store_information/name'), >ENT_QUOTES),

And it did fix the button not saving issue.

1 Like