Creating Users

114 views
Skip to first unread message

tat...@gmail.com

unread,
Aug 23, 2016, 10:25:24 PM8/23/16
to AtoM Users

Hi everyone,

 

Whenever I create a new AtoM user, when I try to edit it, or just view its details, I get this error message:

 

2016/08/24 02:09:45 [error] 911#911: *19 FastCGI sent in stderr: "PHP message: Empty module and/or action after parsing the URL "/h26n.6swd.nbnq" (/)" while reading response header from upstream, client: 177.41.137.154, server: stm.arqunb.com.br, request: "GET /index.php/h26n.6swd.nbnq HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.atom.sock:", host: "stm.arqunb.com.br", referrer: "http://stm.arqunb.com.br/index.php/user/list"

 

I already tried the command: php symfony propel:generate-slugs

 

This is happening for every user I create.

 

Should the new users’ slugs really have periods (character “.”)? It seems all other entities are assigned slugs with dashes (“-“). If I manually change on the database the user slug replacing the periods with dashes, then I can view and edit the user.

 

 

Thanks,

Tatiana Canelhas

 

Dan Gillean

unread,
Aug 24, 2016, 3:19:43 PM8/24/16
to ICA-AtoM Users
Hi Tatiana,

We have not seen this error before! And I've just tested created a bunch of users, and could not reproduce it locally - in all cases, dashes were used instead of periods for my new user slugs. My best guess on this one is that it has to do with the specific Locales installed on your machine as part of the Ubuntu installation process.

To generate slugs, we use the PHP extension iconv - you can see where it is invoked in the QubitSlug code here:

iconv will rely on the Locale(s) available in your Linux installation, and I believe that when encountering certain characters that do not convert directly to the target encoding, it will fall back to the default locale. In this case, your default locale might be pt_BR, which may handle the conversion differently, using the period/dot instead of the dash, as expected with en_US.UTF-8.

Here is some information on Locales in Ubuntu, including how to check which ones you have installed, and how to add new ones.

You'll need to make sure you are using UTF-8 versions of any Locales you have installed. If you make any changes, I would recommend not only restarting all services in AtoM, but possibly also restarting the whole machine, so that any locale changes can take effect.


I hope that helps!


Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-users+unsubscribe@googlegroups.com.
To post to this group, send email to ica-atom-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/74438c34-5c19-4fe2-994a-31e55954ee11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

tat...@gmail.com

unread,
Sep 3, 2016, 9:47:10 PM9/3/16
to AtoM Users
Dear Dan & Atom group,

After many attempts to diagnose the cause of my problem, I seem to have finally identified it. Surprisingly, it has nothing to do with languages or locales.

The system started to generate slugs for new users with periods instead of hyphens simply because I changed the Reference code separator setting to ".". If I change it back to the default "-", new users get slugs generated with hyphens once again.

Dan mentioned function slugify on file lib/model/QubitSlug.php. However, it seems that the function that is actually called when generating the slug for a new user is random, in the same file. This function uses the setting app_separator_character as the separator, whereas the function slugify always uses hyphens:


Should the "Reference code separator" setting really affect the generation of slugs? Isn't this a bug? If this is indeed intended, shouldn't there be some kind of validation to make sure the user doesn't set a value that will result in invalid URLs being generated?


Kind regards,

Tatiana Canelhas

To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.

Dan Gillean

unread,
Sep 6, 2016, 5:16:26 PM9/6/16
to ICA-AtoM Users
Wow, great detective work, Tatiana!

You are correct, the separator value does seem to be affecting slug generation, which it should not do.

I've filed the following issue, and I am hoping we can fix this for the 2.4 release.
Thank you for your patience and for your diligent testing!

Regards,

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-users+unsubscribe@googlegroups.com.
To post to this group, send email to ica-atom-users@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages