Your software
My Mautic version is: 4.4.3
My PHP version is: 7.4
My Database type and version is: MySQL 8
Your problem
My problem is: When editing the Hubspot Field Mapping in Plugins, going to the next page of fields causes the Contact Mapping tab to disappear and the next page to not appear on the screen.
These errors are showing in the log: No errors are being displayed. The API returns a successful message in Chrome Dev Tools.
Steps I have tried to fix the problem: I have not tried to alter the code as I do not want to break the syncing that is currently working properly.
Same here. the underlying http request returns {āsuccessā:0} and there is nothing in the log.
@steverobinson @marc.beinder
if you turn the debug mode on by editing app/config/local.php:
ādebugā => true
is there any additional info that provides clue as to what is actually happening?
Iām afraid not. When I enable debug, I get a very verbose output for the load of the initial screen where all the field metadata for hubspot is logged. But if I tail the log while clicking on the pagination controls at the bottom, nothing is appended. No debug info, no errors. And the network request shows a 200 response with {āsuccessā:0} still.
@marc.beinder @mzagmajster I also upgraded to 4.4.4 just in case PR 11416 made a difference. It didnāt. Still nothing in the logs when I try to paginate and still {āsuccessā:0} response to the browser.
@steverobinson Iām not familiar with the Mautic source code, but is it possible that PR 11416 could be the cause of this issue?
@marc.beinder I have a fix, but Iām not good at git/submitting PRs at this time so Iāll post the code here and maybe @mzagmajster or someone else could whip up a PR in the future (or fix it the right way?).
If you edit lines 34-37 of app/bundles/PluginBundle/Controller/AjaxController.php from:
$integration = $request->request->get('integration');
$settings = $request->request->get('settings');
$page = $request->request->get('page');
To:
$integration = $request->query->get('integration');
$settings = $request->query->get('settings');
$page = $request->query->get('page');
it should start working. Itās been a VERY long time since Iāve been an active PHP developer, so I have no idea why the last person used request instead of query and what I might be doing wrong using query instead of request, but at least I have it working and can get my work done today.
I canāt guarantee this also doesnāt break other plugin screens, so remember this if you canāt update settings for another plugin.
1 Like
Thank you! Iāll give this a shot as soon as I am able. If it works Iāll try to get a PR written up. Users should not wait up on me though as I may not be able to get to this for a while.
Would be awesome to get a fix made for this - @steverobinson @mzagmajster @biozshock would you be open to making the PR if @marc.beinder hasnāt got capacity?
Sorry I have not gotten to this yet. Got some personal things going on. I also just made a post about Hubspot sunsetting API Keys in favor of their new Private App offering. This is something that weāll need to migrate to shortly since this will be going into effect November 30th 2022. Iām not familiar enough with the Mautic codebase to make this migration myself, otherwise I would do it and PR it.
I just signed the contributor agreement and submitted a PR for the Hubspot mapping issue. This PR does not address the Hubspot API vs Hubspot Private App issue. @rcheesley
1 Like
I never thanked you, @marc.beinder. thank you for getting this PR done!
1 Like
@steverobinson my pleasure!!
1 Like