# STEP-13 Final, bugfixes

[**STEP-13**](https://github.com/GAkim/SocialShareGraphQl/tree/STEP-13)

{% embed url="<https://www.youtube.com/watch?v=prWuPTWd7Ts>" %}

During the development, I made several mistakes. If you haven't noticed, it is not possible to disable social sharing on pages, let’s fix it, toghether with labels miss match issue in configurations.

1. **social\_share.xml** let’s put labels accordingly to id’s at the correct order

{% code title="ScandiPWA/SocialShareGraphQl/etc/adminhtml/system/social\_share.xml line 31 - 39" %}

```markup
<field id="category_page" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="0" showInStore="0">
   <label>Display On Category Page</label>
   <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>

<field id="product_page" translate="label" type="select" sortOrder="6" showInDefault="1" showInWebsite="0" showInStore="0">
   <label>Display On Product Page</label>
   <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
```

{% endcode %}

2\. **DataProvider.php** wrong config path

{% code title="ScandiPWA/SocialShareGraphQl/Helper/DataProvider.php line 22 - 26" %}

```php
const HOME_PAGE = 'home_page';

const CATEGORY_PAGE = 'category_page';

const PRODUCT_PAGE = 'product_page';
```

{% endcode %}

1. **CategoryPageComponent.plugin.js  and ProductActionComponent.plugin.js** wrong condition

{% tabs %}
{% tab title="CategoryPageComponent.plugin.js" %}
{% code title="scandipwa-socialshare/src/plugin/CategoryPageComponent.plugin.js line 39 - 41" %}

```javascript
if (!enabled || !categoryPage) {
   return null;
}
```

{% endcode %}
{% endtab %}

{% tab title="ProductActionComponent.plugin.js" %}
{% code title="scandipwa-socialshare/src/plugin/ProductActionComponent.plugin.js line 25 -27" %}

```javascript

if (!enabled || !productPage) {
   return null;
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

Congrats)))


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.scandipwa.com/tutorials/scandipwa-social-share/step-13-final-bugfixes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
