Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 07 12:46
    robvandenbogaard edited #3291
  • Feb 07 12:37
    robvandenbogaard opened #3291
  • Feb 07 09:48
    cdfa opened #3290
  • Feb 06 14:15
    mmzeeman labeled #3289
  • Feb 06 14:15
    mmzeeman labeled #3289
  • Feb 06 14:15
    mmzeeman opened #3289
  • Feb 06 13:18

    mworrell on l10n_master

    (compare)

  • Feb 06 13:18

    mworrell on master

    New Crowdin updates (#3287) (compare)

  • Feb 06 13:18
    mworrell closed #3287
  • Feb 06 11:49
    michielklonhammer synchronize #3287
  • Feb 06 11:49

    michielklonhammer on l10n_master

    New translations zotonic.pot (R… (compare)

  • Feb 06 10:13
    mmzeeman labeled #3288
  • Feb 06 10:13
    mmzeeman opened #3288
  • Feb 06 10:02
    michielklonhammer synchronize #3287
  • Feb 06 10:02

    michielklonhammer on l10n_master

    New translations zotonic.pot (R… (compare)

  • Feb 06 08:52

    DorienD on master

    mod_mailinglist: add acl check … (compare)

  • Feb 06 08:52
    DorienD closed #3280
  • Feb 06 01:45
    michielklonhammer synchronize #3287
  • Feb 06 01:45

    michielklonhammer on l10n_master

    New translations zotonic.pot (R… (compare)

  • Feb 05 23:00
    michielklonhammer opened #3287
Arthur Clemens
@ArthurClemens
I will try it again, I may have missed something.
Arthur Clemens
@ArthurClemens
I am getting “page does not exist” at /admin/edit/1 etc. (all user pages):
05:36:08.696 [error] at: "cowmachine:request_1:86", code: 500, dst: #{ip4 => "94.23.6.14",port => 443}, in: cowmachine, level: error, path: <<"/admin/edit/1">>, reason: function_clause, src: #{ip4 => "213.93.222.193",port => 60197}, stacktrace: [{lists,zip,[[int4],[]],[{file,"lists.erl"},{line,391}]},{epgsql,equery,4,[{file,"/home/zotonic/zotonic/_build/default/lib/epgsql/src/epgsql.erl"},{line,263}]},{z_db_pgsql,equery,4,[{file,"/home/zotonic/zotonic/apps/zotonic_core/src/db/z_db_pgsql.erl"},{line,126}]},{z_db,'-q/4-fun-0-',5,[{file,"/home/zotonic/zotonic/apps/zotonic_core/src/db/z_db.erl"},{line,566}]},{timer,tc,2,[{file,"timer.erl"},{line,181}]},{z_db,with_connection,3,[{file,"/home/zotonic/zotonic/apps/zotonic_core/src/db/z_db.erl"},{line,318}]},{z_db,q_row,3,[{file,"/home/zotonic/zotonic/apps/zotonic_core/src/db/z_db.erl"},{line,606}]},{m_identity,get_user_info,2,[{file,"/home/zotonic/zotonic/apps/zotonic_core/src/models/m_identity.erl"},{line,241}]}], text: "Stop request"
05:36:08.697 [info] z_db_pgsql:{286,5} SQL caller <0.7883.0> down with reason normal during on xxx/public: "
                     select key, visited, prop1, modified
                     from identity
                     where rsc_id = $1
                       and type = 'username_pw'"   []
MM Zeeman
@mmzeeman
That is handled by mod_admin. Is it started? You can check with z_module_manager:is_provided(mod_admin, z:c(your_site)).
Arthur Clemens
@ArthurClemens
I use the admin site and can edit pages, just not user pages. The data is from a 0.x installation running on latest master.
MM Zeeman
@mmzeeman
Ah.. you get a 404? What do you get when you type m_rsc:exists(1, z:c(yoursite)). in the shell?
Arthur Clemens
@ArthurClemens
I get true
MM Zeeman
@mmzeeman
Interesting, is it a 404 or a 500 error?
Arthur Clemens
@ArthurClemens
Trying m_identity:get_user_info(1, C).:
(zotonic@ns208588)6> m_identity:get_user_info(1, C).                     
13:01:47.789 [info] z_db_pgsql:{286,5} SQL caller <0.1992.0> down with reason normal during on xxx/public: "
                     select key, visited, prop1, modified
                     from identity
                     where rsc_id = $1
                       and type = 'username_pw'"   []
** exception error: no function clause matching lists:zip([int4],[]) (lists.erl, line 391)
     in function  epgsql:equery/4 (/home/zotonic/zotonic/_build/default/lib/epgsql/src/epgsql.erl, line 263)
     in call from z_db_pgsql:equery/4 (/home/zotonic/zotonic/apps/zotonic_core/src/db/z_db_pgsql.erl, line 126)
     in call from z_db:'-q/4-fun-0-'/5 (/home/zotonic/zotonic/apps/zotonic_core/src/db/z_db.erl, line 566)
     in call from timer:tc/2 (timer.erl, line 181)
     in call from z_db:with_connection/3 (/home/zotonic/zotonic/apps/zotonic_core/src/db/z_db.erl, line 318)
     in call from z_db:q_row/3 (/home/zotonic/zotonic/apps/zotonic_core/src/db/z_db.erl, line 606)
     in call from m_identity:get_user_info/2 (/home/zotonic/zotonic/apps/zotonic_core/src/models/m_identity.erl, line 241)
MM Zeeman
@mmzeeman
a 500.. looks like the user id is omitted somehow.
Looking into it.
Usually the admin user does not have an entry in the identity table.
Ah... looks like I have the same problem here.
hahaha
Arthur Clemens
@ArthurClemens
The same happens with user id 18583
MM Zeeman
@mmzeeman
Screenshot 2021-12-30 at 13.08.35.png
MM Zeeman
@mmzeeman
Screenshot 2021-12-30 at 13.23.36.png
Arthur Clemens
@ArthurClemens
The bug is introduced since 1.0.0-alpha.8
MM Zeeman
@mmzeeman
The resource id was omitted. Pushing a fix for it... You can change line 243 of m_identity.erl. Also looking into why that happened.
Pushed the fix straight to master. The function was completely refactored... Going to add a test for it, so it does not happen again.
Arthur Clemens
@ArthurClemens
Great
Marc Worrell
@mworrell
Oooppsss 🙈😇
Arthur Clemens
@ArthurClemens
Is there a way to make all current users Editor?
Arthur Clemens
@ArthurClemens
Trying to wrap my head around this.
"Hierarchy for: Content Group” => isn’t is strange that “Default Content Group” has Access Control “System Content”?
MM Zeeman
@mmzeeman
The default content group itself is system content.
Arthur Clemens
@ArthurClemens
Is it correct that for ACL rules to apply, I must first add the connection "In User Group” in the user page?
Arthur Clemens
@ArthurClemens
If so, the connection pane does not allow me to find the page, even though I just created it when editing another user.
The console shows this error:
{function_clause,[{z_convert,to_binary,[{19324}],[{file,"/home/zotonic/zotonic/_build/default/lib/zotonic_stdlib/src/
z_convert.erl"},{line,99}]},{z_search_terms,add_or_append,3,[{file,"/home/zotonic/zotonic/apps/zotonic_core/src/
support/z_search_terms.erl"},{line,269}]},{lists,foldl,3,[{file,"lists.erl"},{line,1267}]},{z_search_terms,combine,
2,[{file,"/home/zotonic/zotonic/apps/zotonic_core/src/support/z_search_terms.erl"},{line,164}]},{z_search_terms,
combine,1,[{file,"/home/zotonic/zotonic/apps/zotonic_core/src/support/z_search_terms.erl"},{line,39}]},
{z_search_terms,combine,1,[{file,"/home/zotonic/zotonic/apps/zotonic_core/src/support/z_search_terms.erl"},
{line,33}]},{z_search,handle_search_result,7,[{file,"/home/zotonic/zotonic/apps/zotonic_core/src/support/
z_search.erl"},{line,224}]},{z_search,search_pager,4,[{file,"/home/zotonic/zotonic/apps/zotonic_core/src/
support/z_search.erl"},{line,125}]}]}
My workaround is to add a Relation, and then drag the relation to the “In User Group” box
Arthur Clemens
@ArthurClemens
Should I be able to see the progress on a database-only backup? I don’t see anything on the page, nor in the console.
I see backup files in the data directory, but the Backups page does not show them
MM Zeeman
@mmzeeman
Screenshot 2021-12-30 at 15.39.50.png
There should be buttons on the download page.
Something like the picture above
Arthur Clemens
@ArthurClemens
Yes I remember this, but they ain’t there…
I’ve looked at the generated files in .local/…/files/backup and they look fine
MM Zeeman
@mmzeeman
As admin you should be able to see them, otherwise the user should be able use mod-backup
Also, don't forget to press the "Publish" button on the access control rule page, otherwise you new rules won't be active.
I forget that often because it is scrolled out of view.
Arthur Clemens
@ArthurClemens
I am playing the code in the console.
Dir = z_path:files_subdir_ensure("backup", Context). => returns the correct directory = ok
Files = z_utils:wildcard(filename:join(Dir, "*.sql")). => empty array
filename:join(Dir, "*.sql”). => path/to/site//files/backup/*.sql = ok
z_utils:wildcard(filename:join(Dir, "*.sql")). => empty array
Arthur Clemens
@ArthurClemens

In mod_backup line 412:

Files = z_utils:wildcard(filename:join(dir(Context), "*.sql")),

concatenates the full directory path with the wildcard. This results in an empty array.
But when calling z_utils:wildcard/2 (with the directory as 2nd parameter), it works correctly:

Files = z_utils:wildcard("*.sql", dir(Context)),
z_utils:filter_dot_files removes the files with a dot, and the path contains .local/, so...
You won’t see this on a local dev machine if it is a Mac
Arthur Clemens
@ArthurClemens
It may be that no_dot_file doesn’t do the right thing. It should remove files that start with a dot, not files with a path that contains a dot.
MM Zeeman
@mmzeeman
Ah.. those .local dirs where added at a later stage.
That is probably also the reason why my log files are not available... Those file routines need some tlc.
Marc Worrell
@mworrell
Maybe we should only remove .git and .. ?
or explicitly allow .local and similar?
Arthur Clemens
@ArthurClemens
To prevent future problems I suggest to make the rule as permissive as possible
Marc Worrell
@mworrell
Then only suppress a blacklist, to start .git, . and ... Agree @mmzeeman ?
MM Zeeman
@mmzeeman
In OTP20 filelib:find_file/3 was added. We could have a look to see if that brings any benefit for this. Otherwise restricting the wildcard to something which matches the backup filename a bit more restrictive than *.sql. (Did a rm -rf * .o in a project once. It cleaned up the directory pretty well, but ot didn't help to meet the deadline)