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

No save in any settings thus unable to make changes to Company, Invoice, etc #2790

Closed
Amon-X opened this issue Dec 2, 2022 · 19 comments
Closed

Comments

@Amon-X
Copy link

Amon-X commented Dec 2, 2022

Akaunting version

3.0.10

PHP version

8.1.2

Operating system

Ubuntu 22.04.1 LTS x86_64

Steps to reproduce

Go to Settings -> Select Company
No save or cancel buttons are displayed

Go to Settings -> Select Localisation
No save or cancel buttons are displayed

Go to Settings -> Select Invoice
No save or cancel buttons are displayed

Go to Settings -> Select Email Service
No save or cancel buttons are displayed

Go to Settings -> Select Scheduling
No save or cancel buttons are displayed

Go to Settings -> Select Categories
No save or cancel buttons are displayed

Go to Settings -> Select Currencies
No save or cancel buttons are displayed

Go to Settings -> Select % Taxes
No save or cancel buttons are displayed

Expected result

Expecting a save button to be able to save any changes

Actual result

Unable to save any changes to company, invoices or any settings.

Additional comments

Running the self hosted version. Upgraded from version 2 to 3 and no longer had save buttons show up after the upgrade. I am using an admin account and there are no options for user permissions for save and cancel buttons on the self hosted version.

Relevant log output

No response

@cuneytsenturk
Copy link
Member

Hi Amon,

Please make sure the upgrade is done correctly. Because this issue reason your permissions.

Have a good day.

@Amon-X
Copy link
Author

Amon-X commented Jan 3, 2023

How do I check that the upgrade is done correctly? How do I change the permissions? multiple people are having this exact issue.https://akaunting.com/forum/discussion/general/settings-company-missing-savecancel-buttons-on

@NajibNour
Copy link

@cuneytsenturk Good day, can we get some more guidance on this? What permissions is needed. Who do the files need to be owned by? are we taking about the DB files or the akaunting files?

I am running my instance trough a docker container.

Any help would ge greatly appreciated

@NajibNour
Copy link

All db files are owned by 911 (MariaDB user) and all akaunting files are owned by (www-data)

@NajibNour
Copy link

Looking at the cloud version of akaunting and the self hosted one, When I inspect element on the self hosted one there is no code about the save button...

@Amon-X
Copy link
Author

Amon-X commented Mar 24, 2023

I have tried creating a new company on my self hosted one after the upgrade and I am unable to make any changes. There are permissions missing I suspect it was something that happened between the changes made to the database between 2.x version and 3.x version.

@NajibNour
Copy link

@Amon-X So looking at other tickets its related to the user permissions. But im not able to access that page as I get a 500 error. Investigating that now.

@Amon-X
Copy link
Author

Amon-X commented Mar 24, 2023

Looking at the cloud version of akaunting and the self hosted one, When I inspect element on the self hosted one there is no code about the save button...

The save button only appears if the user has permissions. If you inspect the files themselves they have a code block for displaying a save button.

@NajibNour
Copy link

enabled APP_DEBUG=true getting some errors now

seems like there is missing content in the database

@NajibNour
Copy link

NajibNour commented Mar 24, 2023

Here is where im at. Seems like there's an issue in the database.

SQLSTATE[42S02]: Base table or view not found: 1932 Table 'akaunting.asd_user_invitations' doesn't exist in engine (SQL: select * from `asd_user_invitations` where `user_id` = 1 and `asd_user_invitations`.`deleted_at` is null limit 1) (View: /var/www/html/resources/views/auth/users/edit.blade.php)

I also have the same issue with another table

akaunting.asd_personal_access_tokens
Error    : Table 'akaunting.asd_personal_access_tokens' doesn't exist in engine

@NajibNour
Copy link

NajibNour commented Mar 24, 2023

@Amon-X Can you get yo your user page? or of you get an error 500?

Click on profile or users

image

@Amon-X
Copy link
Author

Amon-X commented Mar 25, 2023

Yes I am able to get to my user page and my account is admin but there is no way to edit permissions without the roles page which you have to buy and last I checked does not work with the self hosted version. The roles and permission app only works with the cloud version I just checked.

@NajibNour
Copy link

Would you be willing to share the contents of your akaunting.asd_user_invitations table? Im trying to rebuild mine so I cab get to the users page and investigate further

@Amon-X
Copy link
Author

Amon-X commented Mar 25, 2023

I can. How would I go about doing that though?

@NajibNour
Copy link

How are you running your instance? Docker containers or standard services?

@Amon-X
Copy link
Author

Amon-X commented Mar 25, 2023

Self hosted on a web server. I am not good with database stuff and just followed a tutorial to get it running. It was manually set up. Something along the lines of this https://computingforgeeks.com/install-akaunting-accounting-software-on-ubuntu/

@NajibNour
Copy link

NajibNour commented Mar 25, 2023

Try the following

sudo mysql -u root -p PASSWORD
use akaunting;
show * from akaunting.asd_user_invitations;```

@Amon-X
Copy link
Author

Amon-X commented Mar 25, 2023

It took me a while because the names were different
mysql> select * from akauntnew.sah_user_invitations;
+----+---------+--------------------------------------+---------------------+---------------------+---------------------+
| id | user_id | token | created_at | updated_at | deleted_at |
+----+---------+--------------------------------------+---------------------+---------------------+---------------------+
| 1 | 4 | (I deleted the token here) | 2023-01-05 18:16:06 | 2023-01-06 02:18:55 | 2023-01-06 02:18:55 |
+----+---------+--------------------------------------+---------------------+---------------------+---------------------+
1 row in set (0.00 sec)

Show wasnt working for me. As I said I am not good with database stuff

@Amon-X
Copy link
Author

Amon-X commented Mar 25, 2023

in the database migration php files Akaunting_3.0.11-Stable/database/migrations/2022_05_10_000000_core_v300.php
Schema::create('user_invitations', function (Blueprint $table) {
$table->id();
$table->integer('user_id')->unsigned();
$table->integer('company_id')->unsigned();
$table->string('token');
$table->timestamps();
$table->softDeletes();
});

In 3.0.4 company id was dropped.
Schema::table('user_invitations', function (Blueprint $table) {
$table->dropColumn('company_id');
});

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