Curious issues with users login...

Closed
Vanguard - Advanced PHP Login and User Management Vanguard - Advanced PHP Login and User Management September 22, 2018
Login to reply
Milos Stojanovic Support Agent
2 months ago

Hey Thomas,

That's really strange. :) No idea how it ended up missing from your db...

But I'm glad you figured it out. :)

- Milos

Thomas Kälber
2 months ago

Hey Milos,

please,- it is not joke what I'm telling you now...:
The reason for this strange issue was that the table "user_activity" was missing.
I do not know why, maybe a corrupt backup file...!? 

So,- this problem is solved now, thank you very much for your assistance.
I have a little, additional problem, but therefore I will establish a new ticket in these days. 

Regards,
Thomas

Milos Stojanovic Support Agent
2 months ago

Hey Thomas,

As you can see from the log file, it's not the same issue. The error you are getting now is related to duplicate foreign key... This happens because it looks like you are trying to install Vanguard inside the same database where it already exists and where those foreign keys are already created.

Because of the same foreign key names, it is not possible to have more than one Vanguard installation inside the same database, so I would recommend you to use a different database to install another version of Vanguard or to upgrade your current Vanguard application to the latest version if that is what you want to achieve.

Regards,

Milos

Thomas Kälber
2 months ago

Hello Milos,

I tried it another time,- always the same issue...
Took a different prefix,- same result.

Logfile attached

- Thomas

Milos Stojanovic Support Agent
2 months ago

Hey Thomas,

According to your log file, you are trying to install Vanguard inside a non-empty database where "int_roles" table already exists. Make sure that you either use an empty database or that you use unique table prefix for new Vanguard installation.

- Milos

Thomas Kälber
2 months ago

Hello Milos,

I'll do my very best... :-)

Attached the logfile regarding to the installation issue.

- Thomas

Milos Stojanovic Support Agent
2 months ago

Hey Thomas,

Really no idea how that happened. I guess you should manually update the foreign keys inside the DB now to relate to correct users table since, from what I can understand, it is DB issue and not related to the app code.

About the installation issues with latest Vanguard version, can you please send me your log file so I can take a look?

- Milos

Thomas Kälber
2 months ago

Hey Milos,

I can't understand this, too.
Some weeks ago I made a backup copy of the table "cl_users", called it "cl_users_1". (via PhpMyAdmin)
Days later I exported this copy and deleted it afterwards in the database.

And from that point on users couldn't login anymore when they were created after creating this copy.
Users they were created before still can login normally.
And when I am importing this table "cl_users_1",- all the users suddenly can login...
I do not understand why there a FOREIGN KEY has been created!?

Yes, already yesterday I have downloaded all the thousands of files and scanned them with "Weaverslave", looking for the phrase "users_1". With no success,- this was not found,- nowhere...!?

Though I have made many modifications and extensions, I finally decided to install the script fresh.
Have been downloading the new version you provide,- and had issues with installing.
In step 4 the tables are created,- but the contents were not filled in.
Tried for a second and a third time, always without success. I believe that the "seeders" have problems wit NULL or NOT NULL in MySQL / MariaDB.

So for now I do not have an idea anymore...
Why is this foreign key there...

Regards,
Thomas

Milos Stojanovic Support Agent
2 months ago

Hey Thomas,

Unfortunately, I don't know how to help you with it since "users_1" does not exist anywhere inside the original Vanguard application. I guess that you have either modified the database directly or you have modified the migrations to look for a wrong table or something like that.

I guess that you can use global search in your project folder and look for "users_1" string across the project to find it.

I would recommend you to download and install the fresh copy of Vanguard and then try to see if the same thing still happens and let me know.

Regards,

Milos

Thomas Kälber
2 months ago

Hey Milos,

exactly this is the right way...
When installing the script, a table named "cl_users" was created.
There is no table called "cl_users_1".
So during the login / logout procedure the script wants to write to "cl_users_1" which does not exist.

In which file do I have to look for this wrong path?
I cannot find it... :-(

Regards,

Thomas

Milos Stojanovic Support Agent
2 months ago

Hey Thomas,

So, according to your Laravel log file, there are some issues with inserting data to user activity table. I see that you have modified the schema and that you have some new tables, so make sure that everything is done properly there. According to the error inside the log file, it looks like the user with the id of "368" does not exist inside your "cl_users_1" table or something like that. 

Regards, Milos

Thomas Kälber
2 months ago

Hi Milos,

yes, of course. I already have had a look on these files,- but couldn't find the reason for this malfunction.
The users all are stored in the database in the ame way...

Thomas

Milos Stojanovic Support Agent
2 months ago

Hey Thomas,

Can you please send me your log files so I can check them to see what can
be the issue?

It is strange thing and you are the first to report such issue, so I'm not
sure what can be a problem.

- Milos

Thomas Kälber
2 months ago

Hi Milos,

again I have some issues with Vanguard.
Checked the logs, but could not find out what has happened.

Some users have problems with login. (but only some,- not all...)
They put in their credentials and go to "Login".
Then this "Whoops, something went wrong..." appears.
But when the now go two steps back with the browser,- they are logged in and can use the interface as usual.
Other users do not have this issue, they were directly leaded to their dashboard.
What does happen here?

Please help asap..., thanks,
Thomas