khzg / littlelink-admin

Littlelink admin is an admin panel for littlelink that provides you a website similar linktree.
GNU Affero General Public License v3.0
91 stars 17 forks source link

Bug In "Watch Page" #2

Closed dinosaw closed 3 years ago

dinosaw commented 3 years ago

Now that I have the application deployed successfully, I'm running into a legitimate issue. Allow me to explain:

After you register, you are brought to the following page where there is a link for "Watch page"

The problem is, the link for "Watch page" is the Auth::user()->name;. But it needs to be the $littlelink_name.

Example being, when I sign up with the name testuser, the "Watch page" links to /+testuser which gives a 404. However my Littlelink name is testuser1, and the link properly works when I navigate manually to /+testuser1.

Either these need to be reversed, or the "Watch page" link needs to be updated.

khzg commented 3 years ago

Thanks for the report and explanation, I fixed it, give it a star :)

dinosaw commented 3 years ago

Thanks this did indeed fix the issue. And starred :)

I ran into another issue when initially deploying this, and not sure if you want me to open a new ticket for it which I don't mind. But basically I was hitting this:

SQLSTATE[42000]: Syntax error or access violation: 1055 'admin_linktest.users.littlelink_name' isn't in GROUP BY (SQL: select `users`.`littlelink_name`, max(links.created_at) as created_at from `links` inner join `users` on `users`.`id` = `links`.`user_id` group by `links`.`user_id` order by `created_at` desc limit 4)

When searching Google, I came across this link where it states:

In config\database.php --> "mysql" array
Set 'strict' => false to disable all.

This fixes the issue.

Just in case you wanted to know any experiences with installation.

khzg commented 3 years ago

This is not recommended due to security issues. Almost the same link

And that I do not have this error.

my system: Server version: 8.0.23-0ubuntu0.20.04.1 - (Ubuntu) Web server Apache/2.4.41 (Ubuntu) Database client version: libmysql - mysqlnd 7.4.3 PHP version: 7.4.3 phpMyAdmin Version information: 4.9.5deb2