# Hubspot Mapping Error

**URL:** <https://forum.mautic.org/t/hubspot-mapping-error/25711>\
**Category:** Product Support\
**Created:** [October 17, 2022, 3:49pm UTC](https://forum.mautic.org/t/hubspot-mapping-error/25711 "2022-10-17T15:49:14Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![marc.beinder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/marc.beinder/32/7256_2.png) [@marc.beinder](https://forum.mautic.org/u/marc.beinder)\
**Post date:** [October 17, 2022, 3:49pm UTC](https://forum.mautic.org/t/hubspot-mapping-error/25711/1 "2022-10-17T15:49:14Z")

</div>

**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.

---

<div class="post-metadata">

**Author:** ![steverobinson](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/steverobinson/32/174_2.png) [@steverobinson](https://forum.mautic.org/u/steverobinson)\
**Post date:** [October 28, 2022, 9:08pm UTC](https://forum.mautic.org/t/hubspot-mapping-error/25711/2 "2022-10-28T21:08:40Z")

</div>

Same here. the underlying http request returns {“success”:0} and there is nothing in the log.

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [October 29, 2022, 9:03am UTC](https://forum.mautic.org/t/hubspot-mapping-error/25711/3 "2022-10-29T09:03:13Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![steverobinson](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/steverobinson/32/174_2.png) [@steverobinson](https://forum.mautic.org/u/steverobinson)\
**Post date:** [October 29, 2022, 1:45pm UTC](https://forum.mautic.org/t/hubspot-mapping-error/25711/4 "2022-10-29T13:45:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![steverobinson](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/steverobinson/32/174_2.png) [@steverobinson](https://forum.mautic.org/u/steverobinson)\
**Post date:** [October 29, 2022, 2:17pm UTC](https://forum.mautic.org/t/hubspot-mapping-error/25711/5 "2022-10-29T14:17:56Z")

</div>

@marc.beinder @mzagmajster I also upgraded to 4.4.4 just in case [PR 11416](https://github.com/mautic/mautic/pull/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.

---

<div class="post-metadata">

**Author:** ![marc.beinder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/marc.beinder/32/7256_2.png) [@marc.beinder](https://forum.mautic.org/u/marc.beinder)\
**Post date:** [October 29, 2022, 3:16pm UTC](https://forum.mautic.org/t/hubspot-mapping-error/25711/6 "2022-10-29T15:16:35Z")

</div>

@steverobinson I’m not familiar with the Mautic source code, but is it possible that PR 11416 could be the cause of this issue?

---

<div class="post-metadata">

**Author:** ![steverobinson](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/steverobinson/32/174_2.png) [@steverobinson](https://forum.mautic.org/u/steverobinson)\
**Post date:** [October 29, 2022, 6:28pm UTC](https://forum.mautic.org/t/hubspot-mapping-error/25711/7 "2022-10-29T18:28:20Z")

</div>

@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:

```auto
        $integration = $request->request->get('integration');
        $settings = $request->request->get('settings');
        $page = $request->request->get('page');

```

To:

```auto
        $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.

---

<div class="post-metadata">

**Author:** ![marc.beinder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/marc.beinder/32/7256_2.png) [@marc.beinder](https://forum.mautic.org/u/marc.beinder)\
**Post date:** [October 31, 2022, 3:37pm UTC](https://forum.mautic.org/t/hubspot-mapping-error/25711/8 "2022-10-31T15:37:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [November 23, 2022, 3:23pm UTC](https://forum.mautic.org/t/hubspot-mapping-error/25711/9 "2022-11-23T15:23:10Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![marc.beinder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/marc.beinder/32/7256_2.png) [@marc.beinder](https://forum.mautic.org/u/marc.beinder)\
**Post date:** [November 25, 2022, 3:23am UTC](https://forum.mautic.org/t/hubspot-mapping-error/25711/10 "2022-11-25T03:23:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![marc.beinder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/marc.beinder/32/7256_2.png) [@marc.beinder](https://forum.mautic.org/u/marc.beinder)\
**Post date:** [November 25, 2022, 3:36am UTC](https://forum.mautic.org/t/hubspot-mapping-error/25711/11 "2022-11-25T03:36:38Z")

</div>

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. @silavapi

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [November 25, 2022, 9:31am UTC](https://forum.mautic.org/t/hubspot-mapping-error/25711/12 "2022-11-25T09:31:11Z")

</div>

Yeah that issue is already being dealt with in a separate PR: [Fix/change hubspot api auth by npracht · Pull Request #11470 · mautic/mautic · GitHub](https://github.com/mautic/mautic/pull/11470)

---

<div class="post-metadata">

**Author:** ![steverobinson](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/steverobinson/32/174_2.png) [@steverobinson](https://forum.mautic.org/u/steverobinson)\
**Post date:** [December 20, 2022, 1:16am UTC](https://forum.mautic.org/t/hubspot-mapping-error/25711/13 "2022-12-20T01:16:59Z")

</div>

I never thanked you, @marc.beinder. thank you for getting this PR done!

---

<div class="post-metadata">

**Author:** ![marc.beinder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/marc.beinder/32/7256_2.png) [@marc.beinder](https://forum.mautic.org/u/marc.beinder)\
**Post date:** [December 20, 2022, 3:30am UTC](https://forum.mautic.org/t/hubspot-mapping-error/25711/14 "2022-12-20T03:30:52Z")

</div>

@steverobinson my pleasure!!
