Troubleshooting
Common issues and solutions when using the Simple Calendar Compatibility Bridge.
Installation Issues
Bridge Not Loading
Symptoms: No "Simple Calendar Compatibility Bridge | Ready" message in console
Solutions:
- Check Module Order: Ensure calendar module (Seasons & Stars) is installed and active
- Clear Cache: Clear browser cache and reload Foundry
- Check Conflicts: Ensure Simple Calendar is NOT installed alongside the bridge
- Restart World: Sometimes requires a world restart after installation
Simple Calendar Conflict
Symptoms: Error messages about conflicting SimpleCalendar objects
Solutions:
- Disable Simple Calendar: The bridge replaces Simple Calendar - don't use both
- Check Module List: Look for "foundryvtt-simple-calendar" in module list
- Clean Install: Disable conflicting module and restart world
Module Load Order Issues
Symptoms: Bridge works but dependent modules don't see the API
Solutions:
- Wait for Ready Hook: Some modules need to wait for 'simple-calendar-init' hook
- Check Console: Look for module initialization order in browser console
- Manual Refresh: Try refreshing the browser after all modules load
Simple Weather Issues
Weather Not Generating
Symptoms: No weather appears, no automatic generation
Solutions:
- Check Calendar Integration: Verify Seasons & Stars is working properly
- Enable Auto-Generation: Turn on "Sync with Simple Calendar" in Simple Weather
- Set Season Icons: Ensure calendar seasons use standard icons (spring, summer, fall, winter)
- Manual Trigger: Try manually generating weather first
Debug Steps:
// Check if Simple Calendar API is available
console.log('SimpleCalendar available:', !!window.SimpleCalendar);
console.log('API methods:', Object.keys(window.SimpleCalendar.api));
// Check current date
console.log('Current date:', SimpleCalendar.api.getCurrentDate());
Weather Not Persisting
Symptoms: Weather resets when reloading or changing dates
Solutions:
- Enable Note Storage: Turn on "Store weather in Simple Calendar notes"
- GM Permissions: Only GMs can create calendar notes
- Check Journal Entries: Look for "Simple Weather - Daily Weather" entries
- Verify Flags: Weather data should be stored in entry flags
Debug Steps:
// Check for weather notes
const notes = SimpleCalendar.api.getNotesForDay(2024, 0, 0); // January 1st
console.log('Notes found:', notes.length);
// Check note flags
notes.forEach(note => {
console.log('Note flags:', note.flags['simple-weather']);
});
Missing Sidebar Buttons
Symptoms: No weather button appears on calendar widgets
Solutions:
- Enable Attached Mode: Turn on "Attach to Calendar" in Simple Weather settings
- Check Widget Visibility: Ensure calendar widgets are displayed
- Console Errors: Look for button integration errors in console
- Refresh Widgets: Close and reopen calendar widgets
Debug Steps:
// Check if buttons are registered
console.log('Sidebar buttons:', SimpleCalendar.api.sidebarButtons);
// Check for calendar widgets
console.log('Calendar widgets:', document.querySelectorAll('.calendar-widget, .calendar-mini-widget'));
SmallTime Issues
Time Display Not Working
Symptoms: SmallTime shows incorrect time or doesn't update
Solutions:
- Check Calendar Time: Verify Seasons & Stars time is working
- SmallTime Settings: Configure SmallTime to use Simple Calendar time
- Hook Registration: Ensure SmallTime is listening for time change hooks
Clock Controls Not Working
Symptoms: SmallTime play/pause buttons don't work
Solutions:
- GM Permissions: Only GMs can control time advancement
- Calendar Module: Ensure underlying calendar supports time advancement
- API Methods: Check if advance methods are implemented
Calendar Module Issues
Seasons & Stars Not Detected
Symptoms: Bridge reports no calendar provider found
Solutions:
- Module Active: Ensure Seasons & Stars is installed and active
- Version Check: Update to latest version of Seasons & Stars
- Integration Interface: Check if S&S integration interface is available
Debug Steps:
// Check Seasons & Stars availability
console.log('S&S available:', !!game.seasonsStars);
console.log('S&S integration:', !!game.seasonsStars?.integration);
console.log('S&S API:', !!game.seasonsStars?.api);
Season Sync Issues
Symptoms: Simple Weather doesn't use correct season from calendar
Solutions:
- Season Icons: Use standard season icons in calendar configuration
- Season Setup: Properly configure seasons in Seasons & Stars
- Manual Override: Use manual season selection if needed
Date Format Issues
Symptoms: Dates appear incorrect or cause errors
Solutions:
- Bridge Conversion: The bridge handles format conversion automatically
- Custom Calendars: Ensure custom calendar structure is valid
- Fallback Mode: Check if bridge is using fallback date handling
API Issues
Missing Methods
Symptoms: Modules report missing Simple Calendar methods
Solutions:
- Full API: The bridge implements complete Simple Calendar API
- Method Names: Check for typos in method names
- Timing: Ensure API is ready before calling methods
Debug Steps:
// List all available API methods
console.log('Available methods:', Object.keys(SimpleCalendar.api));
// Test specific method
console.log('timestampToDate available:', typeof SimpleCalendar.api.timestampToDate);
Hook Issues
Symptoms: Modules not receiving Simple Calendar hooks
Solutions:
- Hook Names: Use correct hook names from
SimpleCalendar.Hooks
- Registration Timing: Register hooks after 'simple-calendar-init'
- Event Data: Check hook data format matches expectations
Debug Steps:
// Test hook system
Hooks.on('simple-calendar-date-time-change', (data) => {
console.log('Date change hook received:', data);
});
// Trigger date change to test
SimpleCalendar.api.advanceDays(1);
Performance Issues
Slow Loading
Symptoms: Long delay before modules are ready
Solutions:
- Module Count: Reduce number of active modules if possible
- Browser Performance: Close other tabs, restart browser
- Foundry Performance: Check Foundry system requirements
Memory Usage
Symptoms: High memory usage, browser slowdown
Solutions:
- Module Cleanup: Bridge cleans up on disable
- Browser Restart: Restart browser if memory usage is high
- Module Updates: Ensure all modules are up to date
Development/Debugging
Console Debugging
Enable detailed console logging:
// Check bridge status
console.log('Bridge status:', game.simpleCalendarCompat);
// Check provider information
console.log('Provider:', game.simpleCalendarCompat?.provider);
// Check API availability
console.log('API ready:', !!SimpleCalendar?.api);
// Test basic functionality
console.log('Current timestamp:', SimpleCalendar.api.timestamp());
console.log('Current date:', SimpleCalendar.api.getCurrentDate());
Common Error Messages
"No supported calendar module found"
- Install and activate Seasons & Stars
- Check if calendar module is compatible
"Only GMs can create calendar notes"
- Log in as GM to use note features
- Check user permissions
"Calendar module API not available"
- Wait for all modules to load
- Check calendar module initialization
Reporting Issues
When reporting issues, include:
- Foundry Version: Which version of Foundry VTT
- Module Versions: Versions of bridge, calendar module, and affected modules
- Console Output: Any error messages or warnings
- Steps to Reproduce: Detailed steps to recreate the issue
- Expected vs Actual: What should happen vs what actually happens
Module Compatibility Testing
Test basic compatibility:
// Test API completeness
const requiredMethods = [
'timestamp', 'timestampToDate', 'getCurrentDate',
'addNote', 'getNotesForDay', 'removeNote',
'addSidebarButton'
];
requiredMethods.forEach(method => {
console.log(`${method}:`, typeof SimpleCalendar.api[method]);
});
// Test note functionality (GM only)
if (game.user.isGM) {
const testNote = await SimpleCalendar.api.addNote(
'Test Note',
'Test content',
SimpleCalendar.api.getCurrentDate(),
SimpleCalendar.api.getCurrentDate(),
true
);
console.log('Test note created:', testNote);
const notes = SimpleCalendar.api.getNotesForDay(
testNote.flags['simple-calendar-compat'].startDate.year,
testNote.flags['simple-calendar-compat'].startDate.month,
testNote.flags['simple-calendar-compat'].startDate.day
);
console.log('Notes retrieved:', notes.length);
await SimpleCalendar.api.removeNote(testNote.id);
console.log('Test note removed');
}