- Installing and upgrading help
- Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
- Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
- Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
- Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
- Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
- Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
- Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
- Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
- Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
- Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
- Create personal page for every user, PHP
- 4 Answers 4
Installing and upgrading help
I just upgraded to Moodle 3.8 (build 20191118). Now I (as the admin) and probably other users can no longer access my profile — when clicking on the link next to my name at the top right, nothing happens. (Well, a blue box is drawn around the name and triangle, but no menu pops up). The same applies when clicking on the «burger menu» — nothing happens. Also, grading a submission does not seem to work (loads endlessly).
I tested this on my main computer (macOS, Safari + Firefox + Chrome) and Windows 10 (in a VM, Firefox + Edge), so I assume that this is a general issue. I have no idea what the reason might be, and debugging also does not show anything helpful.
It does show in the server logs that a file is missing (as below), and hints on what can be done to fix this would also be appreciated (the file actually exists in the top directory).
2019/11/17 13:03:59 [error] 10005#10005: *28511404 FastCGI sent in stderr: «PHP message: Default exception handler: File not found. Debug:
* line 494 of /lib/setuplib.php: moodle_exception thrown
* line 2074 of /lib/filelib.php: call to print_error()
* line 96 of /admin/lib.php: call to send_file_not_found()
* line 5009 of /lib/filelib.php: call to core_admin_pluginfile()
* line 44 of /pluginfile.php: call to file_pluginfile()» while reading response header from upstream, client: 213.152.161.74, server: moodle.informatik.tu-darmstadt.de, request: «GET /pluginfile.php/1/core_admin/logo/0x200/1573991495https%3A//moodle[. ]/apple-touch-icon.png HTTP/1.1», upstream: «fastcgi://unix:/run/php/php7.3-fpm.sock:», host: «moodle.[. ]», referrer: «https://moodle.[. ]/login/index.php»
Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
Which version did you upgrade from? How did you upgrade? What are you running moodle on? Your own server? Hosted? Linux? Windows? Did you perform any php upgrades? Sounds more like a server issue but you could start by redownloading the moodle code to check that something did not corrupt during the original upgrade.
Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
It’s on a virtual machine hosted by our department running Linux/nginx. There were no PHP upgrades and Moodle worked fine just before the upgrade.
I moved the original 3.7.3 version out of the way (in a different directly) and used git (branch/checkout/pull) to get the 3.8 sources, then ran upgrade and moved all additional plugins from the 3.7.3+ version back into place.
When I hover the mouse over the user menu, the link displayed at the bottom of the page is only «https://moodle. /#», which may be correct as this is only supposed to show a dropdown.
Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
Thanks — whatever the problem was, a complete uninstall/reinstall from git seems to have resolved it.
Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
The culprit seems to be mod_groupformation. Once I reinstall the plugin (copy the resources from an archive and run «upgrade.php», the dropdowns etc. are broken. If I remove it again (uninstall + upgrade.php), everything is back in order, so it must somehow be that plugin’s fault.
I am sorry but I was not able to debug the reason behind this.
Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
Hi, I am having a similar problem. Just upgraded from 3.7.3+ to 3.8 on Boost theme on 18.04 Ubuntu Linux and php 7.2
After upgrade, many of the menu’s are not working as for example the user profile drop-down, Site-admin’s secondary menus such as users, courses, etc.
The only group plugin I am using is mod_grouptool. I uninstalled this in the 3.7.3+ version and switched theme to classic and retried the upgrade with exact same type results. I hand purged cache for good measure. I do not get any error messages with debug set to developer.
I notice that the URL becomes https://rahilmahmood.com/moodle/admin/search.php#linkusers even when I try to click the various menus on the site-admin page. So this is a problem! When I replace the url with /admin/users.php it goes to the correct admin users page.
Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
We have mod_grouptool installed without a problem, so I do not think that this is causing the problem.
What worked for me (but took a lot of time) was to move the installation into a different directory; install a clean version (with git pull) and add the config file, and then add one file + run «upgrade.php» and check if the menus were still working, and then repeat this for the next plugin. That was how I found our culprit. I also had the problem that there were no meaningful (or any) error messages when the plugin was installed.
The good news (I guess) was that if I uninstalled the problematic plugin (and ran upgrade.php), everything worked fine, so I did not have to «start from scratch».
Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
I’m having the same problems on a git upgrade from 3.7.3+ to 3.8. My server is a CentOS 7.7.1908 installation running php 7.4. I have the theme set as the default Boost and notice the same #link* phenomenon as you mention. Using the search takes me to where I wish to go, but other things such as what Guido mention don’t work either: the left-side menu drawer, personal profile, etc. I’ve tried in various browsers (Safari, Chrome & Firefox), but the problem persists.
I have debugging set to «Developer» and sending error messages to HTML and have been getting the following error messages:
Notice: Trying to access array offset on value of type null in /var/www/html/moodle/lib/mustache/src/Mustache/Parser.php on line 278
Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
We have looked into this today and performed various testing scenarios (with both upgrading and with/without the mentioned plugins). These issues don’t relate to performing the upgrade itself, but rather existing JavaScript issues within one or more third party plugins are surfacing when those plugins are installed with Moodle 3.8.
In the case of mod_groupformation, the key error is that some JavaScript is not being defined correctly, which is causing an error that prevents other JavaScript executing on the page, such as that which switches between the site admin tabs. I will attempt to contact the plugin maintainer for that plugin today and let them know about the issue (it is also worth mentioning that plugin has not been updated since Moodle 3.5).
For Madhu and others experiencing this issue who do not have mod_groupformation installed, I would suggest some other installed plugin is likely not following the current JS guidelines, and triggering a similar bug. I did also test mod_grouptool, which seemed fine and did not cause the same issue. If you are able to identify the culprit(s), the best course of action would be to contact the relevant plugin maintainer, so they are hopefully able to address the issue and publish a compatible version.
Regarding the search.php URLs ending in #linkusers, #linkcourses etc, those are correct on the relevant admin section, and have just been updated in that way to allow refreshing/navigating back in your browser to that admin page to retain the correct visible section on the page, rather than defaulting back to the base «site administration» tab.
I hope that information is helpful, and you’re able to find any remaining sources of the issue soon!
Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
Thank you for your reply and the analysis, Mick!
My Moodle (and especially JavaScript) skills were only sufficient to pinpoint the culprit (in my case), but not to analyse the reason behind this. As such, could you give a link to information on how one can tell whether «some JavaScript is not being defined correctly»? That is, are there some «telltale sign» or other indications that would let users tell if the JavaScript in plugin X should be OK or might be the case of error?
Best regards,
Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update
Not a problem! It’s a tricky one to answer, because there could be many different causes. In general, checking the browser console for any errors is a good place to start, then following those to determine the source (and if you can/need to, analysing that to determine why it’s an issue). In this case, following the error in the browser console led to a JavaScript file which was calling a function immediately after it was initialised, rather than just defining it for later use in the correct place (there is an example of how it should have been defined in the JavaScript modules docs). We were able to confirm that was the issue by updating the code locally, then confirming the issues on the page were fixed. A slightly less complicated way to confirm the suspected file was the culprit, particularly since the file was minified (not easily human readable), was to first identify the suspected cause, then simply remove that JavaScript from the file briefly, and confirm that also stopped the bug appearing on the page.
Note: We were testing and modifying code on local development servers, and I’d advise only modifying files to troubleshoot issues such as this in a non-production environment, so live users aren’t affected and to avoid risking any other damage/data loss of production data. In the upgrade overview docs, we recommend performing a test upgrade on a copy of your site before going ahead with upgrading your main site (in case any issues arise), so using that separate copy of your site could also be an option (assuming it does not modify production data).
Create personal page for every user, PHP
What I want to do is to create a web page for every user when they signup on my page. For Example: www.someweb.com/username, and this will be their webpage. I know that this can be done easily with mkdir() and other related functions, but the problem is that my root folder is not chmod 777 and I don’t want to chmod 777 this root folder because of security reasons. What is the best way to do this when a user registers on my web page.
Can some one let me know how to configure the RewriteRule for this yrl: someweb.com/users.php?username=agonfx21
4 Answers 4
Most likely you don’t need to create these directories in real.
Just make it virtual.
Pass a username using query string, like this:
www.someweb.com/index.php?user=username
And personalize this page according to particular username. After that you can do some rewrite magic and make a page address like this www.someweb.com/username but all pages will remain virtual
Dear @AXheladini before making it look professional, you have to make it just work. An only then do some decorations, bells and whistles.
You don’t make physical directories for each user, you use URL rewriting. Take a look at this source:
Use mod_rewrite to make a request to /username actually be ?user=username . You can then get the appropriate user’s data and display it in a template.
if you want to create personal page for each user after signup
->when a new user do the signup at ur site then create a new directory with the name of username at the location of user folder like /user/username/
create a file under this directory with name of index by using create file function /user/username/index write the following code using read/write operations if ur using php
"; fwrite($myfile, $str); fclose($myfile); ?>
this user-profile will have the functionality to retrieve the user info from the database with the help of variable $p_username. in this way an user can also visit the profile of other user