-
Notifications
You must be signed in to change notification settings - Fork 35
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
Unable to Create New Role with "Incorrect role short name" #26
Comments
Is possible that the problem is caused because we are using postgresql instead of mariadb, can you please check if with MariaDB it works? |
Tried with mariadb, unfortunately, still the same error, below the
|
I think is a moodle error and I am who opened MDL-77369. Please vote, watch or add comment there 😃 |
That is what I doubt actually. I did tried a 4.0 GCP Marketplace stack (not docker) and there is no issue, but the same version on docker faces the issue. Also, not sure if help, I tried moosh 0.39 and it could create new roles normally from command line (might be a workaround for now?). @lupa18 have you bypassed the issue? |
@jimsihk I'm still waiting :-/ |
I tried to set PHP |
I was checking if was problem with the PHP version (8.0) and the moodle version but seems is not related I was debugging and seems the root problem can be in the By the way I setted up a new upstream version (4.1.2+) and PHP 8.1 but the problem persists, I will continue testing it, any news I will write here |
Unfortunately, I tried with PHP8.1 and 4.1.2 still the same. |
Please @jimsihk go to moodle issue tracker and comment my issue to see if can we move it. Thanks! |
Added a message to move this! |
I managed to test the bitnami docker but it works, so it seems not really related to Moodle code itself? Would that be related to Nginx that we are using but bitnami is using Apache?
|
As also mentioned in the Moodle tracker, the issue is caused by the incompatible version of iconv in Alpine (which seems to be a well-known problem) and that's why Bitnami's work because it is using Debian. The line of code with problem: https://github.com/moodle/moodle/blob/1d863c338ac6ace8e6b945f0e2c49753acfdb837/lib/classes/text.php#L351 One of the workaround could be replacing iconv with gnu-libiconv but need pointing to an older version as mentioned in docker-library/php#240 (comment):
Another way could be exploring to switch the base image to php:fpm-alpine3.17 which built PHP using the gnu-libiconv as mentioned in docker-library/php#1264 |
Hi Jim, Thank you for the detailed research on this issue! It's great that you've identified the cause of the problem and provided potential workarounds. I agree that sticking with the Alpine version is preferable, and I appreciate your suggestion to use gnu-libiconv. Regarding the version mentioned in the linked messages, it's true that they refer to gnu-libiconv-1.16-r0. However, as you've pointed out, the Alpine 3.17 repository has the 1.17-r0 version, which could potentially contain a fix for this issue. It's worth trying out the newer version and see if it resolves the problem. I'll implement these changes and test if the updated configuration works as expected. If everything goes well, we should have a functional Alpine-based solution. I'll keep you updated on the progress. Once again, thanks for your valuable input and suggestions! Best regards, |
I tried gnu-libiconv=1.15-r3 does work, but higher version seems missing something or just not match with PHP8+. Let's see if any other options. |
Considering it is a Alpine related issue instead of just Moodle, I tried to apply a quick fix on the base image and tested working, see if any suggestion (May need to cherry pick the commit for PR). |
Quick-and-dirty fix for issue #26 with gnu-libiconv
Hi @jimsihk Best regards. |
Tried to search around, seems only PHP 8.3 has applied a fix on it. Not sure if the community agreed to apply to PHP 8.2 as well. Reference: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15114#note_362481 |
Thanks for the reference! Based on this, I've created a new |
That would be good! But Moodle official support on PHP 8.3 would be on Moodle 4.4 onwards, shall we wait? https://moodledev.io/general/development/policies/php#php-83 |
Thank you for pointing this out! Given that Moodle's official support for PHP 8.3 is slated to begin with Moodle 4.4, it does seem prudent to wait before implementing these changes. In light of this information, I will close the current issue and note in PR #58 that we should hold off until PHP 8.3 receives official support, hopefully in Moodle 4.4 as indicated. This approach ensures our alignment with Moodle's official development and support policies, maintaining stability and compatibility for our users. I appreciate your input and look forward to adapting our environment in line with Moodle's future updates. Thanks for your help! |
I just had a try with Moodle 4.4rc1 with PHP 8.3, unfortunately the error still happened. I have read again the alpine issue thread and it seems I have overlooked and the commit is NOT yet merged to the main. Guess we still need to stick to the dirty fix for now. |
Hi @jimsihk, thank you for bringing this to our attention! I will keep this issue open and monitor it until the release of Moodle 4.5. Please let us know if there are any updates or changes in the meantime. :) |
Hi @jimsihk, I hope you're doing well. I wanted to check in and ask if you've had a chance to test Moodle 4.5.0 and, if so, whether you know if the issue with Best, |
I haven't tried but since the issue is caused by iconv on alpine, it is still pending to fix. See https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/61689. |
Ok, let's wait so, thanks! |
Hi,
When defining new roles, it will always rejected by "Incorrect role short name". I tried using the docker-compose.yaml with moodle 4.0 version up to the latest are still facing the same problem.
For comparison, I tried picking the bitnami stack from GCP and it works without this issue. Do you think is related to NGINX and MariaDB? I don't have a chance yet to test the bitnami moodle container though.
I also notice that there is an issue logged on official tracker as MDL-77369 and the issue seems related to container only.
Any thought?
The text was updated successfully, but these errors were encountered: