Skip to content

Commit feb9c91

Browse files
master3395cyberpanel
authored andcommitted
Fix emailMarketing reverse error + dashboardStatsController ctrlreg
- CyberCP/urls.py: when emailMarketing app is missing/broken, register placeholder path with name='emailMarketing' so {% url 'emailMarketing' %} never raises Reverse not found. - public/static/baseTemplate/custom-js/system-status.js: replace old copy with full system-status.js that registers dashboardStatsController and systemStatusInfo (fixes Angular [:ctrlreg] and raw {{$ cpuUsage $}} on overview).
1 parent 6df7c4a commit feb9c91

File tree

2 files changed

+1836
-13
lines changed

2 files changed

+1836
-13
lines changed

CyberCP/urls.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,15 @@
2626
# includes each installed plugin (under /plugins/<name>/) so settings and
2727
# other plugin pages work for any installed plugin.
2828

29-
# Optional app: may be missing after clean clone or git clean -fd (not in all repo trees)
29+
# Optional app: may be missing after clean clone or git clean -fd (not in all repo trees).
30+
# When missing or broken, register a placeholder so {% url 'emailMarketing' %} in templates never raises Reverse not found.
3031
_optional_email_marketing = []
3132
try:
3233
_optional_email_marketing.append(path('emailMarketing/', include('emailMarketing.urls')))
33-
except ModuleNotFoundError:
34-
pass
34+
except (ModuleNotFoundError, ImportError, AttributeError):
35+
_optional_email_marketing.append(
36+
path('emailMarketing/', RedirectView.as_view(url='/base/', permanent=False), name='emailMarketing')
37+
)
3538

3639
urlpatterns = [
3740
# Serve static files first (before catch-all routes)

0 commit comments

Comments
 (0)