Skip to content

Fix duplicate ThemisDB_Markdown_Converter class declaration - #290

Merged
makr-code merged 2 commits into
developfrom
copilot/fix-redeclare-markdown-converter
Jan 8, 2026
Merged

makr-code merged 2 commits into
developfrom
copilot/fix-redeclare-markdown-converter

Conversation

Copilot AI commented Jan 8, 2026 •

Copy link
Copy Markdown
Contributor

Both themisdb-downloads and themisdb-wiki-integration plugins declare identical ThemisDB_Markdown_Converter classes. When both plugins are active, PHP throws a fatal redeclaration error.

Changes

  • Wrapped class declarations with class_exists() guards in both plugins
  • First loaded plugin defines the class, second skips declaration
if (!class_exists('ThemisDB_Markdown_Converter')) {

class ThemisDB_Markdown_Converter {
    // ... class implementation
}

}

Files Modified

  • wordpress-plugin/themisdb-downloads/includes/class-markdown-converter.php
  • wordpress-plugin/themisdb-wiki-integration/includes/class-markdown-converter.php
Original prompt

wordpress themis download zeigt folgenden Fehler:
Fehler beim Abrufen der Anmeldeinformationen des Administrators: PHP Fatal error: Cannot redeclare class ThemisDB_Markdown_Converter (previously declared in /var/www/vhosts/themisdb.org/httpdocs/wp-content/plugins/themisdb-downloads/includes/class-markdown-converter.php:11) in /var/www/vhosts/themisdb.org/httpdocs/wp-content/plugins/themisdb-wiki-integration/includes/class-markdown-converter.php on line 11

Fatal error: Cannot redeclare class ThemisDB_Markdown_Converter (previously declared in /var/www/vhosts/themisdb.org/httpdocs/wp-content/plugins/themisdb-downloads/includes/class-markdown-converter.php:11) in /var/www/vhosts/themisdb.org/httpdocs/wp-content/plugins/themisdb-wiki-integration/includes/class-markdown-converter.php on line 11

Error: Es gab einen kritischen Fehler auf deiner Website.Erfahre mehr über die Problembehandlung in WordPress. Es gab einen kritischen Fehler auf deiner Website.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix fatal error due to redeclaration of ThemisDB_Markdown_Converter Fix duplicate ThemisDB_Markdown_Converter class declaration Jan 8, 2026
Copilot AI requested a review from makr-code January 8, 2026 14:45
@makr-code
makr-code marked this pull request as ready for review January 8, 2026 15:16
@makr-code
makr-code merged commit 4513ab8 into develop Jan 8, 2026
@makr-code makr-code added this to the v1.0.2 milestone Mar 11, 2026
Copilot AI added a commit that referenced this pull request May 19, 2026
Exception hardening (batch 4):
- http_server.cpp: 4 remaining catch(...) → typed catch
- query_engine.cpp: 8 remaining catch(...) → typed catch

Stub #279 (🔴 Kritisch): DistributedTransactionManager::runPhase2Unlocked
- RemoteDecisionFn type alias + setRemoteDecisionFn/clearRemoteDecisionFn API
- runPhase2Unlocked calls injected fn for callback-less remote participants
- Tests DTM-RPC-01..03 in test_transaction_distributed_2pc.cpp

Stub #290 (🟠 Hoch): DistributedTrainer::allreduce_cpu
- AllReduceCpuFn type alias + setAllReduceCpuFn/clearAllReduceCpuFn API
- allreduce_cpu delegates to injected fn; local scale fallback retained
- Tests AR-01..02 in test_stub_remediation_290_303.cpp

Stub #296 (🟢 Niedrig): FeedbackStore::getSpamKeywords
- SpamKeywordsProviderFn type alias + static set/clearSpamKeywordsProvider API
- getSpamKeywords calls injected fn; falls back to static list on empty/throw
- Tests SKWS-01..04 in test_feedback_store.cpp

Stub #303 (🟡 Mittel): LLMModelStorage::listModels
- listModels, getModelEdges, findSimilarModels now use RocksDBWrapper::scanPrefix
- Empty-vector placeholder removed from all three scan paths

STUB_INVENTORY.md: 321 entries, 277 resolved, 44 active
CHANGELOG.md updated

Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/34113055-e0a1-4af5-bf7d-7ad1f7bde5cf

Co-authored-by: makr-code <[email protected]>
Copilot AI added a commit that referenced this pull request May 20, 2026
…302, #308-311 (10 stubs)

- #290: DistributedTrainer::AllReduceCpuFn injection API; allreduce_cpu() delegates to injected fn, falls back to local-scale for world_size=1
- #291: AdaptiveShardRouter::NlpContextFn injection API; prepareQueryContext() delegates to NLP provider, falls back to keyword patterns
- #296: FeedbackStore::SpamKeywordsProviderFn (static setSpamKeywordsProvider); getSpamKeywords() uses provider when set
- #297: FeedbackStore::applyPluginValidation() (non-const FeedbackEntry&); MODIFY path applies modified_comment/modified_metadata
- #298: Http2Session RAII ResponseBuffer via shared_ptr + response_buffers_ map; no more raw new/delete; sendResponse+sendServerPush+onStreamCloseCallback updated
- #302: VoiceApiHandler::TokenValidatorFn (static setTokenValidatorFn); validateBearerToken() delegates to injected JWT validator
- #308: VoiceAssistant::deleteSession() hard-delete (throws out_of_range if not found); handleDeleteSession() returns HTTP 404 on not-found
- #309: GPUMemoryManager::NvmlTemperatureFn (static setNvmlTemperatureFn); CUDA updateGPUHealth() queries injected fn
- #310: AutoRebalancer::signOperation() all UNSIGNED fallbacks replaced with std::runtime_error (fail-closed)
- #311: PaxosStatePersistence::persistAccept() ConsensusLogEntry populated with index/term/data JSON

Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/138b1d85-2afa-4f88-ba0a-761fe11a5fbd

Co-authored-by: makr-code <[email protected]>
Copilot AI added a commit that referenced this pull request May 20, 2026
- Add RerouteSerializeFn tests (stub #252)
- AstVisitorFn bridge: TensorAwareQueryOptimizer (stub #275)
- ExactSimilarityFn bridge: TensorFingerprintGraph (stub #276)
- [[deprecated]] attribute: ggmlCorePtrs (stub #277)
- RpcPhase2Fn bridge: DistributedTransactionManager (stub #279)
- AuthorizeFn bridge: RopeApiHandler RBAC (stub #280)
- HttpPostFn bridge: AIPluginGenerator (stub #282)
- HTToTTFn bridge: HTTrain (stub #286)
- ModelPathProviderFn bridge: LoRATrainingService (stub #289)
- AllReduceCpuFn bridge: DistributedTrainer (stub #290)
- NlpContextFn bridge: AdaptiveShardRouter (stub #291)
- StringArrayFn bridge: PropertyGraphManager (stub #292)
- SchemaInspectorFn/SchemaValidatorFn: ImportApiHandler (stub #294)
- Lz4CompressFn/Lz4DecompressFn: SecureTransportClient (stub #295)
- SpamKeywordsProviderFn: FeedbackStore (stub #296)
- MODIFY path fix: FeedbackStore validateWithPlugin (stub #297)
- shared_ptr ResponseBuffer RAII: Http2Session (stub #298)
- ModelPathProviderFn: ThemisHelpLoRA Config (stub #299)
- IngestExternalFileFn: BackupManager (stub #300)
- StatsQueryFn: RopeApiHandler (stub #307)
- Update STUB_INVENTORY.md: 272->292 resolved, 44->24 active

Co-authored-by: Copilot <[email protected]>

Co-authored-by: makr-code <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants