Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugs in installation #53

Closed
MomoDerDodo opened this issue Jan 21, 2024 · 6 comments
Closed

Bugs in installation #53

MomoDerDodo opened this issue Jan 21, 2024 · 6 comments

Comments

@MomoDerDodo
Copy link

While following the install instructions i ran into a few bugs.

When i try to run the migrations i get the following error:
grafik

I changed the type of the status column to string and was able to proceed.

Then after i follow the steps i get to the contributor creation. After entering the prompted data i get the the following error:
grafik

@MohmmedAshraf
Copy link
Owner

Hi @Morice99,

I've tried installing the package on fresh Laravel multiple times, and I didn't encounter a similar issue. Could you please provide more information about your PHP version, Laravel version, and the database driver you're using?

@MomoDerDodo
Copy link
Author

Hi, thanks for the reply.

My versions are:

  • PHP: 8.1
  • Laravel: 10.41.0

My Database driver is the default configured mysql that looks like this:

'mysql' => [
         'driver' => 'mysql',
         'url' => env('DATABASE_URL'),
         'host' => env('DB_HOST', '127.0.0.1'),
         'port' => env('DB_PORT', '3306'),
         'database' => env('DB_DATABASE', 'forge'),
         'username' => env('DB_USERNAME', 'forge'),
         'password' => env('DB_PASSWORD', ''),
         'unix_socket' => env('DB_SOCKET', ''),
         'charset' => 'utf8mb4',
         'collation' => 'utf8mb4_unicode_ci',
         'prefix' => '',
         'prefix_indexes' => true,
         'strict' => true,
         'engine' => null,
         'options' => extension_loaded('pdo_mysql') ? array_filter([
             PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
         ]) : [],
     ]

@MomoDerDodo
Copy link
Author

Also i tried it with default and fresh laravel installation and it also fails

@NoahNxT
Copy link
Contributor

NoahNxT commented Jan 22, 2024

Same issue here, seems to be an issue with the TEXT type of the status column. After some digging I found that adding a default value to a TEXT column type isn't possible out of the box, herefore you have to configure your mysql installation a specific way, and also run a version 8.0+

replacing it by the column type STRING like this:
$table->string('status')->default(StatusEnum::active->value);

solves it.

Looking at the code this field is also only for the statuses which you pre-integrated. So adding a TEXT type column would be unneccesary, which make a STRING type enough.

@MohmmedAshraf
Copy link
Owner

MohmmedAshraf commented Jan 22, 2024

Hi @MomoDerDodo,

This should be fixed by @NoahNxT here #55, please try the new release.

@MomoDerDodo
Copy link
Author

The fist bug is fixed, thank you :)

But the second one with the Contributer Creation is still present for me.

Outhebox\TranslationsUI\Enums\RoleEnum::from(): Argument #1 ($value) must be of type int, string given

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants