# Pro Widget Kit - Troubleshooting Guide

## 🚨 Common Issues & Solutions

### Issue: "Sorry, you are not allowed to access this page" Error

This error occurs when trying to access the Pro Widget Kit dashboard. Here are the solutions:

#### **Solution 1: Check User Permissions**
- Make sure you're logged in as an **Administrator** user
- Only users with `manage_options` capability can access the dashboard
- If you're not an admin, ask your site administrator to give you access

#### **Solution 2: Plugin Menu Location**
Pro Widget Kit has its own dedicated menu in the WordPress admin:

**Main Menu Location:**
- Go to: `WordPress Admin → Pro Widget Kit → Dashboard`
- Look for the Pro Widget Kit icon in the left sidebar
- The menu appears after the "Comments" menu item

**Available Pages:**
- 📊 **Dashboard** - Main widget management interface
- ⚙️ **Settings** - Plugin configuration (coming soon)

#### **Solution 3: Clear Cache & Refresh**
1. Clear any caching plugins (WP Rocket, W3 Total Cache, etc.)
2. Clear browser cache (Ctrl+F5 or Cmd+Shift+R)
3. Log out and log back in
4. Try accessing the dashboard again

#### **Solution 4: Check Plugin Requirements**
Make sure you meet the minimum requirements:
- ✅ WordPress 5.0 or higher
- ✅ Elementor 3.0.0 or higher  
- ✅ PHP 7.4 or higher
- ✅ Administrator user role

#### **Solution 5: Debug Mode**
Enable debug mode to get more information:

1. **Enable WordPress Debug Mode:**
   ```php
   // Add to wp-config.php
   define('WP_DEBUG', true);
   define('WP_DEBUG_LOG', true);
   ```

2. **Access with Debug Info:**
   ```
   http://your-site.com/wp-admin/admin.php?page=advanced-widget-kit-for-elementor&debug=1
   ```

3. **Check Debug Logs:**
   - Look in `/wp-content/debug.log`
   - Check for Pro Widget Kit related errors

#### **Solution 6: Deactivate/Reactivate Plugin**
1. Go to `Plugins → Installed Plugins`
2. **Deactivate** Pro Widget Kit
3. **Activate** it again
4. Try accessing the dashboard

#### **Solution 7: Check for Plugin Conflicts**
1. Deactivate all other plugins temporarily
2. Try accessing Pro Widget Kit dashboard
3. If it works, reactivate plugins one by one to find the conflict

---

## 🔧 Advanced Troubleshooting

### Check File Permissions
Make sure these files/folders have correct permissions:
```
advanced-widget-kit/ (755)
├── admin/ (755)
├── includes/ (755)
├── assets/ (755)
└── All .php files (644)
```

### Manual Menu Check
Add this code to your theme's `functions.php` to force create the menu:
```php
add_action('admin_menu', function() {
    if (class_exists('AWKE_Admin')) {
        add_menu_page(
            'Pro Widget Kit Debug',
            'AWKE Debug',
            'manage_options',
            'AWKE-debug',
            function() {
                echo '<h1>Pro Widget Kit Debug</h1>';
                echo '<p>If you see this, the plugin is loaded correctly.</p>';
                echo '<p>Current user can manage_options: ' . (current_user_can('manage_options') ? 'Yes' : 'No') . '</p>';
                echo '<p>Elementor active: ' . (class_exists('\Elementor\Plugin') ? 'Yes' : 'No') . '</p>';
            }
        );
    }
}, 99);
```

### Database Check
Check if plugin options are created:
```sql
SELECT * FROM wp_options WHERE option_name LIKE '%AWKE%';
```

---

## 📞 Still Need Help?

If none of these solutions work:

1. **Check System Requirements Again**
   - WordPress version: `Dashboard → Updates`
   - PHP version: `Dashboard → Site Health → Info`
   - Elementor version: `Dashboard → Plugins`

2. **Contact Support**
   - 📧 Email: support@awk.ainixit.com
   - 🌐 Website: https://awk.ainixit.com/support
   - 📚 Documentation: https://awk.ainixit.com/docs/advanced-widget-kit

3. **Provide This Information:**
   - WordPress version
   - Elementor version  
   - PHP version
   - Active theme name
   - List of active plugins
   - Error messages (if any)
   - Screenshots of the issue

---

## ✅ Quick Checklist

Before contacting support, please verify:

- [ ] WordPress 5.0+ installed
- [ ] Elementor 3.0.0+ installed and activated
- [ ] PHP 7.4+ running
- [ ] Logged in as Administrator
- [ ] Pro Widget Kit plugin is activated
- [ ] No plugin conflicts
- [ ] Cache cleared
- [ ] Browser cache cleared

---

**Pro Widget Kit v1.0.0**  
**Created by Ainix IT** - https://awk.ainixit.com
