Fix: Change route from /admin to / to avoid Nextcloud conflicts
- Changed route URL from /admin to / (root path) - /admin was conflicting with Nextcloud built-in admin routes - Now uses apps/analyticshub/ instead - Changed route name from admin#index to page#index - Follows Nextcloud naming conventions - Updated info.xml navigation - Points to analyticshub.page.index - Removed <settings> section (can cause conflicts) - Updated AdminController - Added request path to diagnostic output - Better styling for simple HTML page The route was conflicting with Nextcloud's admin system. New URL: https://teamworkapps.com/index.php/apps/analyticshub/
This commit is contained in:
@@ -15,6 +15,7 @@ use OCP\IRequest;
|
||||
class AdminController {
|
||||
|
||||
private $appName;
|
||||
private $request;
|
||||
|
||||
public function __construct(string $appName, IRequest $request) {
|
||||
$this->appName = $appName;
|
||||
@@ -30,13 +31,20 @@ class AdminController {
|
||||
public function index(): void {
|
||||
echo '<!DOCTYPE html>';
|
||||
echo '<html>';
|
||||
echo '<head><title>Mini-CMO Analytics Hub</title></head>';
|
||||
echo '<head>';
|
||||
echo '<title>Mini-CMO Analytics Hub</title>';
|
||||
echo '<style>';
|
||||
echo 'body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; padding: 40px; }';
|
||||
echo 'h1 { color: #0082c9; }';
|
||||
echo '</style>';
|
||||
echo '</head>';
|
||||
echo '<body>';
|
||||
echo '<h1>Mini-CMO Analytics Hub</h1>';
|
||||
echo '<p>Controller is working! App name: ' . htmlspecialchars($this->appName) . '</p>';
|
||||
echo '<p><strong>Status: Admin accessible!</strong></p>';
|
||||
echo '<p><strong>App Name:</strong> ' . htmlspecialchars($this->appName) . '</p>';
|
||||
echo '<p><strong>Status:</strong> Controller is working!</p>';
|
||||
echo '<p><strong>Route:</strong> ' . htmlspecialchars($this->request->getPathInfo()) . '</p>';
|
||||
echo '<hr>';
|
||||
echo '<p>Test successful - routing is working.</p>';
|
||||
echo '<p>✅ Routing test successful!</p>';
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user