# Troubleshooting - DMM Affiliate Quick Link Shortcode

## ❓ Shortcode doesn't display anything

**Cause**: Missing or invalid `cid` parameter.
**Solution**: Always specify `cid` like this: `[dmm_quick_link cid="1dandy00914a"]`

---

## 🔒 API request fails (no image or link appears)

**Cause**: DMM API is not reachable, or API ID is invalid.
**Solution**:

- Make sure you’ve replaced `YOUR_API_ID_HERE` in the plugin file
- Check if `wp_remote_get()` is allowed by your hosting environment

---

## 🖼️ Broken or missing image

**Cause**: `cid` not found or DMM removed the title
**Solution**:

- Double-check the `cid` spelling
- Try accessing the image URL directly to confirm

---

## 🛡️ Security plugin blocks external API

**Cause**: Some firewall/security plugins block outgoing requests
**Solution**:

- Allowlist `api.dmm.com` in your security plugin settings

---

## 🔁 Changes don’t appear immediately

**Cause**: Caching (browser or plugin)
**Solution**:

- Clear browser cache
- If using caching plugin, clear site cache

---

Still stuck? Contact: [support@trok.co.jp](mailto:support@trok.co.jp)

## 🔗 Shortcode returns only a raw URL or incorrect output

**Cause**: You're using `link_only="1"` or `link_only="wp"` but not seeing the expected result.  
**Solution**:

- Make sure you're using the correct syntax:
  - `[quick_link_dmm cid="XXXX" link_only="1"]` → outputs plain URL
  - `[quick_link_dmm cid="XXXX" link_only="wp"]` → outputs URL with `!` to avoid WordPress oEmbed
- Be aware that some themes may auto-link URLs even in raw output

## 🆔 aid parameter does not work

**Cause**: You specified `aid=""` but plugin falls back to `cid=""`  
**Solution**:

- If both `cid` and `aid` are specified, only `cid` is used
- Make sure `aid` is numeric and valid (e.g., `2011464`)
- Example: `[quick_link_dmm aid="2011464" link_only="1"]`

---

## 🆕 v1.4.1 以降のフローティングバナー関連の注意点

- **バナーが最初から表示されてしまう/非表示にならない**
  - 古いインライン JS やキャッシュが残っていないか確認
  - PHP/JS 両方で初期 opacity:0; pointer-events:none;になっているか確認
- **show_at/delay が効かない・何も表示されない**
  - ショートコードのスペルミスやパラメータ間のスペース抜けに注意
  - HTML ソースで data-show-at/data-delay 属性が出ているか確認
- **z-index を調整しても重なり順が変わらない**
  - モーダルやサイドメニューの z-index 値を F12 で調べ、間の値に設定
  - バナーが body 直下に移動しているか確認
- **外部 JS（floating-banner.js）が読み込まれない/動作しない**
  - Network タブで 200 で読み込まれているか、Console でエラーが出ていないか確認
  - CSP やキャッシュ、パスの問題に注意
- **show_at=0 で delay のみ有効にしたい場合**
  - `[quick_link_dmm ... show_at="0" delay="5"]` のように指定
  - 0 以外は従来通りスクロール判定
