Moodle - Using "Old code" when I am actually using the newest version - moodle

I have had too many problems with my ubuntu moodle server, so now tried to do a factory resetting of my server and install everything anew. Even though I checked out with the newest git repo available, I am still getting the following error message:
https://imgur.com/a/raAd7VB
The branch I checked out with was 'origin/MOODLE_400_STABLE'.
Thanks in advance.

Check the value for version in your database
SELECT value
FROM mdl_config
WHERE name = 'version'
Then search for the value in the releases, this will tell you which version the database is using
https://docs.moodle.org/dev/Releases
You might need to do a git pull for the latest version of Moodle 4

Related

TYPO3 Upgrade Psr Problem vom 10.x to 11.5.8,

I tried to upgrade from 10.x to 11.5.8 and nothing was working anymore. If I try to open the url I recieve the following error message:
Fatal error: Declaration of TYPO3\CMS\Extbase\Mvc\Controller\AbstractController::processRequest(TYPO3\CMS\Extbase\Mvc\RequestInterface $request, TYPO3\CMS\Extbase\Mvc\ResponseInterface $response) must be compatible with TYPO3\CMS\Extbase\Mvc\Controller\ControllerInterface::processRequest(TYPO3\CMS\Extbase\Mvc\RequestInterface $request): Psr\Http\Message\ResponseInterface in C:\inetpub\wwwroot\typo3\sysext\extbase\Classes\Mvc\Controller\AbstractController.php on line 243
So the next step was to disable all my extensions.
If I try to open the backend, I recieve the same message as above.
The next step was to use the Install Tool, which was working. But if I try to use some functions like "Upgrade Wizard", "Analyze Database Structure", "
Remove Temporary Assets", ....
But the sys_log and the log files under typo3temp are empty!
And also the firefox degugger is not showing any information.
PHP 7.4.15, no composer installation and chaches all deleted!
What should I do next?
The first error message says that there are Extbase extensions which are not compatible with v11. See https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.0/Breaking-92502-MakeExtbaseHandlePSR7ResponsesOnly.html
For the second error I'd recommend to look into the dev console of your browser. There you might see more information about the error when there is nothing in the logs. (Maybe there is an error when writing log?)
The mentioned file "AbstractController.php" exists only in version 10 and was removed afterwards.
So TYPO3 is using some old files, probably from the file-cache.
You wrote that you use an installation without composer-setup. Those installations have the file-cache saved in typo3temp/var/cache. This folder can be deleted completely and will be rebuilt automatically.
Afterwards TYPO3 version 11 should run and the error-message should never be shown again.
Due to my experiences with updating TYPO3 to a new mayor release, i did the following steps.
Renamed fileadmin dir
Deleted all TYPO3 dirs
Installed the new version of TYPO3
Start TYPO3 from scratch with an new database (use the ID and passwort from the final database, use the right sitename)
Rename the fileadmin dir back to fileadmin
Go into LocalConfiguration.php and switch under DB to the original database
(Maybe) enable 'debug' => true, for BE and FE and set 'displayErrors' => 1, under SYS
Try to start the BE, if failed go to the Install tool.
Start Upgrade Wizard under Upgrade
In the Install tool start the Analyze Database Structure, but be carefull. that you dont't delete any database of your extensions, which not installed yet!
Now the BE should work now and you can upgrade your extensions!
Good Look.

Sitefinity upgrade from 8.2 to 12.2 - Build succeeded but while running the project it gets stuck in between and nothing seems to be happening

I was trying to upgrade Sitefinity from 8.2 to 12.2 using the Sitefinity upgrade document. https://www.progress.com/documentation/sitefinity-cms/122/upgrade-from-sitefinity-cms-8.0-and-below
Steps followed :
Uninstalled the old version from Nuget
Changed the .Net framework to 4.7.2
Reinstall all packages
Added few properties in assemblyinfo.cs
Installed Sitefinity 12.2
Uninstalled Thunder, Dropbox libraries, Telerik.Sitefinity.MobileAppBuilder, Telerik.Sitefinity.DAM
Telerik.Sitefinity.EverliveConnector
Now the build is successful but it is getting stuck. Need some help with this. Is it ok to directly upgrade from 8.2 to 12.2 or upgrade from 8.2 to 10 and from 10 to 12.2? Which approach is preferred?
From the error messages in the comments of your post:
Value of 'null' is not valid for 'stream'...
Telerik.Sitefinity.Modules.Pages.PageTemplateHelper.UpdateDefaultTemplateImages(PageManager pageManager, LibrariesManager librariesManager, Album album) at Telerik.Sitefinity.Modules.Libraries.LibrariesModule.Upgrade(SiteInitializer initializer, Version upgradeFrom) at Telerik.Sitefinity.Services.ModuleBase.Install(SiteInitializer initializer, Version upgradeFrom) at Telerik.Sitefinity.Services.SystemManager.InitializeModuleTelerik.Sitefinity.Modules.Pages.PageTemplateHelper.UpdateDefaultTemplateImages(PageManager pageManager, LibrariesManager librariesManager, Album album) at
Telerik.Sitefinity.Modules.Libraries.LibrariesModule.Upgrade
(SiteInitializer initializer, Version upgradeFrom) at Telerik.Sitefinity.Services.ModuleBase
.Install(SiteInitializer initializer, Version upgradeFrom) at Telerik.Sitefinity.Services.SystemManager.InitializeModule
It looks the upgrade fails due to a problem with a page template thumbnail.
I suggest you run this SQL script towards the database - it will return all Image records (media content) for the page template thumbnails:
select * from sf_media_content as mc
join sf_content_link as cl
on cl.child_item_id = mc.content_id
where parent_item_type = 'Telerik.Sitefinity.Pages.Model.PageTemplate'
Have a look at the returned results and see if any of them looks suspicious.
Export the results to csv for easy access.
Then do a database backup.
Then, you can pick one of the images, e.g. one with default_url of: /images/SystemLibrariesProvider/template-thumbnails/mvc_default
and record its content_id, e.g. 78EB6662-F8C9-4A2E-85CA-966898D433F1
Then execute this SQL:
update sf_content_link
set child_item_id = '78EB6662-F8C9-4A2E-85CA-966898D433F1'
where parent_item_type = 'Telerik.Sitefinity.Pages.Model.PageTemplate'
Then kill the process and start the site.
If that image is good, the upgrade should proceed, if you were not lucky - then pick another content_id from your CSV and run the same update sql script with the new Id.
Restart and repeat until it works.
If all is good - you will end up with all page templates having the same thumbnail, but that's not a critical issue and can be fixed later.

What's the best way to upgrade from umbraco 7.6 to 7.15.1 (including db upgrade)

I am trying to upgrade the site from v 7.6 to v. 7.15.1.
I have done the upgrade on localhost which included updating the db.
Now I transferred my files from localhost o the test site and on there I am getting an error in log:
ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred
System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'umbracoUserLogin'.
and I can't login to the backoffice.
It seems to be looking for umbracoUserLogin on test while it doesn't exist yet because on test the db is not updated yet.
How to update the db on test in this case while the files have already been updated on localhost and transferred to test site?
I have done 2 umbraco upgrades recently; one is from 7.5.7 to 7.13.1 and the recent one is from 7.13.1 to 7.15.1.
During my upgrade; I have seen this problem and fix in this issue can help you for your problem(and I didn't see this problem again after doing the upgrade again, but this time checking all the auto changing files and accepting them one at a time-see details below for this) but coming back to your question; "What's the best way to upgrade from umbraco 7.6 to 7.15.1(including db upgrade)"; here are the steps that you should follow;
Create a backup for your project and your umbraco db before you start. If you are using Git, then things will be super easy for this.
Open up Nuget Package Manager for your Umbraco project and do the package upgrade using the Nuget Package Manger window or the consol. Search for UmbracoCms version 7.15.1 for your case.
Once you start doing the upgrade, you will see some popup windows that will ask you to approve some auto file changes(including some config files changes). As you don't want to lose some of your pre-upgrade settings, don't accept them all or discard them all, check all of them one by one, and as a general rule; if you don't have any custom changes for those files, then simply approve the change, otherwise, check your changes and make sure you don't loose anything and discard some of these file changes as a result.
Once you're done with your UmbracoCms upgrade(which will automatically do some dependency package upgrades), build your project, make sure all is looking good then go to your local project's umbraco back-office url, this will trigger the rest of the umbraco upgrade process and simply complete the upgrade steps by following the screens- at this point your umbraco db changes will be done automatically and it is possible that you might have some issues with some old corrupt cached files, if this happens, then simply delete App_Data/TEMP files and App_Data umbraco.config file and try again. If you see some other problems during the installation, check the logs(browser developer tools can be handy to understand the problems in this case), and fix them one at a time. It is possible that you don'T need some of your old web.config settings and they might cause some issues, simply comment out those lines and see if this will fix some of the issues.
Once you are done with you local upgrade, deploy your code to your testing environment, and go to the umbraco url of your test environment and follow the screens to complete the installation for your testing environment. If you see any problems, please check my notes for step 4 above.
Do your umbraco upgrade for other testing environments(QA, UAT, Training etc) and complete your umbraco upgrade tests. Once the tests are done, then you are ready to go live. After the live deployment, you will have to complete the umbraco upgrade one last time, but this time for the live system.
Always get your back-ups for each environment before you do the upgrade, so you will be ready to rollback your changes if things go wrong(which might happen as you're doing a big umbraco upgrade).
Final note; there are some good articles for this, please take a look to understand the process better. Good luck!

Commit Not Found on Bitbucket on PreReceiveRepositoryHook

I am trying to validate a file on PreReceiveRepositoryHook and been following examples from atlassion site(https://bitbucket.org/roadsidepicnic/atlassian-bitbucket-check-commits-hook) and githup project (https://github.com/hmcmanus/yaml-validator-hook), neither one work because they can not find the commit just made. Anyone else facing same issue?
CommitRequest commitReq = new CommitRequest.Builder(repository, refChange.getToHash()).build();
Commit com1 = commitService.getCommit(commitReq);
Atlassian folks helped me solve the issue, here is the snippet,
There are two remedies. Choose one of:
1.) Downgrade the version of git on your server to version 2.10.2 or older.
OR:
2.) Update to Bitbucket Server 4.13.0 or newer.
To do #2 in your first example you would adjust these values in that example's pom.xml.
From this:
4.3.2
4.3.2
To this:
4.13.0
4.13.0
more details # https://answers.atlassian.com/questions/46816348/commit-not-found-on-pre-receive-hook

How can I set collapseRequests in my buildbot master.cfg

I try to set collapseRequests in my buildbot master.cfg, but when I add
c['collapseRequests'] = True
Error shows that "Unknown BuildmasterConfig key collapseRequests";
When I try to add collapseRequests in BuilderConfig, using
c['builders'].append(BuilderConfig(..., collapseRequests=True))
Error shows that "__init__() got an unexpected keyword argument 'collapseRequests' (traceback in logfile)"
Any suggestions?
Thanks.
Probably you are not using a version of Buildbot that supports collapseRequests. If I Google for it, I can only find references in the documentation for the development version of Buildbot. If you check that page, you'll see at the top there's a warning that the documentation is for the development version of Buildbot and there's a link to the documentation of the latest released version.
The latest released version (at the time of writing this answer) is 0.8.12 and does not support collapseRequests. What it does support is mergeRequests.