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

Compatibility with NextCloud 26 #353

Open
cyrilst opened this issue Mar 22, 2023 · 9 comments
Open

Compatibility with NextCloud 26 #353

cyrilst opened this issue Mar 22, 2023 · 9 comments

Comments

@cyrilst
Copy link

cyrilst commented Mar 22, 2023

Steps to reproduce

1.Upgrade to NextCloud 26.0.0

Expected behaviour

ocsms should work

Actual behaviour

it's impossible to even activate ocsms

Server configuration

Nextcloud/ownCloud version: 26.0.0

PHP version: 8.1.13

HTTPd server: apache

Database engine & version: MariaDB 10.6.11

Logs

Exception: Class "OCP\AppFramework\Db\Mapper" not found in file '/path/to/nextcloud/apps/ocsms/db/conversationstatemapper.php' line 21
@cyrilst
Copy link
Author

cyrilst commented Mar 22, 2023

I have a fix. In these files:

  • /path/to/nextcloud/apps/ocsms/db/conversationstatemapper.php
  • /path/to/nextcloud/apps/ocsms/db/smsmapper.php
  • /path/to/nextcloud/apps/ocsms/db/configmapper.php

Change use \OCP\AppFramework\Db\Mapper; to use \OCP\AppFramework\Db\QBMapper;
Change class NameOfTheMapper extends Mapper to class NameOfTheMapper extends QBMapper

That should be enough.

@jimbolaya
Copy link

Is this a php 8.1 related change? I tried making the change in NC 25 with no luck, but I'm also only running php 8.0.

@cyrilst
Copy link
Author

cyrilst commented May 1, 2023

I don't think it's related to a specific version of php. I recently upgraded to php 8.2 and the fix still works.
If you just change Mapper to QBMapper in the 2 lines in each of the 3 files, it should be OK, even in php 8.0.

@jimbolaya
Copy link

OK, thanks. It must be a NC 25 vs 26 issue. I still get a "Please select a conversation from the list to load it." and the rest of the page is blank.

I'll try again in NC 26 when I get there.

@cyrilst
Copy link
Author

cyrilst commented May 1, 2023

Oh, maybe you need to have a look at this : #347
I had to apply the change proposed by adi2k5 when upgrading from NC 24 to NC 25.

@jimbolaya
Copy link

That's the ticket. Thanks. I would have stumbled on that eventually, but you saved me a ton of time and I appreciate that.

@palouf34
Copy link

palouf34 commented May 4, 2023

I have a fix. In these files:

  • /path/to/nextcloud/apps/ocsms/db/conversationstatemapper.php
  • /path/to/nextcloud/apps/ocsms/db/smsmapper.php
  • /path/to/nextcloud/apps/ocsms/db/configmapper.php

Change use \OCP\AppFramework\Db\Mapper; to use \OCP\AppFramework\Db\QBMapper; Change class NameOfTheMapper extends Mapper to class NameOfTheMapper extends QBMapper

That should be enough.

Hi,

I have made the modification on the three files requested, but I still have the error.

I can't find the file I need to modify for the class.

The only difference is that I use postgresql as my database.

@cyrilst
Copy link
Author

cyrilst commented May 5, 2023

I wasn't clear enough: the 2 changes are in each of the 3 files. And in each file you must search for class <something> extends Mapper. NameOfTheMapper is a placeholder.

@BrunoTouze
Copy link

BrunoTouze commented May 6, 2023

Hi,
Like Jimbolaya i can't see any sms (just "Please select a conversation from the list to load it.").
I've add the two lines in the css/style.php (overflow-x and overflow-y) without success.
Tables are well filled by the Nextcloud SMS app of FDROID.
Is somebody can show me his full app-navigation section in style.css ?

Nextcloud 26.0.1
Apache 2.4.56-1
Mariadb 10.5.19
php8.2

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

4 participants