Open generator85 opened 1 year ago
@generator85 which version of Statamic are you using?
The latest version (4.7.0)
Just commenting here as it may be relevant. The latest version hasn't been published to packagist. But with the changes in that version (which I've attempted to apply manually) I also get logged out of the CP.
Hi @benfreke and @generator85 I've updated it in Packagist now, so it's showing 1.0.1
Yes, the issue still exists with v1.0.1
From what I can tell the problem lies in the middleware.
The package seems to use the 'web' middleware, this middleware does not pass an authenticated cp user cookie.
Changing the middleware from web to the following solves the issue for me.
Route::middleware('statamic.cp.authenticated')->group(function () {
Route::get('/simonridley/trackingcodemanager/', '\Simonridley\TrackingCodeManager\Http\Controllers\TrackingCodeManagerController@index')->name('simonridley.tracking-code-manager.index');
Route::post('/simonridley/trackingcodemanager/', '\Simonridley\TrackingCodeManager\Http\Controllers\TrackingCodeManagerController@update')->name('simonridley.tracking-code-manager.update');
});
Altho this should be altered in the package source files ;-)
Any updates on this?
Created a pr for this on https://github.com/simonridley/tracking-code-manager/pull/8
Would anyone like to become a collaborator as I don't have much time to do this
HI @simonridley
I'm happy to help collaborate on this. I also don't have too much time but happy to help out with small stuff like this.
I just installed this package, but when clicking "Tracking Code Mgr" I get logged out of the control panel.
Also the menu item "Tracking Code Mgr" doesn't have an icon, which doesn't look very good next to all the other menu items.