HoltBosse / Alba

Basic developer oriented CMS system
7 stars 2 forks source link

Redirectsmanager #341

Closed bobmitch closed 1 month ago

bobmitch commented 1 month ago

Allow manual creation of URL redirects in the backend. Config value (capture_404s) if set to true will also automatically create unpublished relative-URL redirects in this same area and keep count of the number of times this URL has generated a 404 for ease of redirect creation later.

bobmitch commented 1 month ago

Clicking 'hits' column will order by hits for targeting 'popular' 404s. Probably worth a bigger conversation later about column ordering for content area too.

workaj commented 1 month ago

still going to check it out on my dev and test it, but should put a migration in /admin/settings/updates for this

bobmitch commented 1 month ago

still going to check it out on my dev and test it, but should put a migration in /admin/settings/updates for this

added in https://github.com/HoltBosse/Alba/pull/341/commits/66beefb052ab9bdc1985667d3f63c9077b14e694

workaj commented 1 month ago

installed with migration capture_404s enabled in config.php file 404's get the following error now

Failed to create PDO query statement: SQLSTATE[HY000]: General error: 1364 Field 'new_url' doesn't have a default value

workaj commented 1 month ago

image

trying to save a redirect

does actually save however

workaj commented 1 month ago

image

delete redirect still shows in normal view

bobmitch commented 1 month ago

installed with migration capture_404s enabled in config.php file 404's get the following error now

Failed to create PDO query statement: SQLSTATE[HY000]: General error: 1364 Field 'new_url' doesn't have a default value

Out of date schema used - new_url can and should be null by default for auto created redirects. New URL in backend is 'required' by the field/logic.

Fixed https://github.com/HoltBosse/Alba/pull/341/commits/2daa24a17dfd0a08c3c274ebf2289e755fe0ef4f and https://github.com/HoltBosse/Alba/pull/341/commits/64e4304d336a1d981fc12e6009fe91c85792cba0

Note: fixed the sql error in both those as well

workaj commented 1 month ago

image

trying to save a redirect

does actually save however

@bobmitch this still isnt fixed

bobmitch commented 1 month ago

image trying to save a redirect does actually save however

@bobmitch this still isnt fixed

fixed in https://github.com/HoltBosse/Alba/pull/341/commits/cb60ce618a779a35acb384a85861e96cbbf9d461

bobmitch commented 1 month ago

@workaj worth adding an information status like this?
image

workaj commented 1 month ago

@workaj worth adding an information status like this? image

nah, probably just confuse people. can add it later if needed