Typo3 extension are automatically deactivated - typo3

i have a running Typo3 7.6.11 installation on my webhoster.
I noticed that the extensions "powermail" and "dynamic content elements" get somehow automatically deactivated over night.
I can activate them in the Backend via Extensions, but the next morning they are both deactivated again.
Any ideas on that?

What cron-jobs and scheduler-tasks are configured? at what time?
the next I would do is writing a cronjob, which logs every 5 minutes the md5-hash of your PackageStates.php into a file. if the file is modified the hash should change and you nearly know the time the change occurs. compare to cron-jobs/ scheduler-tasks running at that time.

Check the system log of your installation, if someone else did not login during night into your system. If no-one did, contact your webhoster, since someone has is changing your files directly on the system, so they should be able to figure out if it is some security issue or maybe some faulty backup procedures.

In the Install-Tool there is an option to do a check for broken extensions and after the check the "broken extensions" are deinstalled automatically. May be you have a task running in the scheduler that does this routine?
Normally after a system update some of the extensions are broken because they use a deprecated api and also have to be updated, so you should also check if there is an update for these extensions.

do you have an automatic deployment?
does this deployment know that these extensions needs to be active?

Please check permission of typo3conf/PackageStates.php file, Is there any cron-job that automatic deactivate extensions.
If not then try to overwrite extensions with new vesrion.

Related

Is there a way to reset a UWP app using powershell?

I see that there are way to Get Get-AppxPackage or Remove Remove-AppxPackage UWP app from windows 10 using PowerShell.
I am wondering if there is a way to reset a UWP app? I require it for automated testing, I would rather reset the UWP app than uninstall and install again, as that would slow down the testing.
If you're looking to clear your package's ApplicationData then you want
appdata = Windows.Management.Core.ApplicationDataManager.CreateForPackageFamily(pkgfamilyname)
appdata.ClearAsync()
See MSDN for ApplicationDataManager.CreateForPackageFamily() and .ClearAsync()
Powershell has no 'await' affordance last time I looked (though it's been a while) so not so viable. If you're looking to muck with applicationdata you may find APPDATA.EXE handy. You can probably guess why I wrote it... :P For instance
APPDATA.EXE Clear foo.bar_1234567890abc
If you're looking to reset a package to its initially installed state, then no, there is no API other than uninstall + install
Remove-AppxPackage foo.bar_1.2.3.4_x86__1234567890abc
Add-AppxPackage foobar.msix
Settings' Reset option for an installed package essentially does that just slightly more efficiently. You're still going thru the full deregister and uninstall the package and then install and register it for the user so it may not be instantaneous. But that's the only way to truly reset a package to its initial state. Windows has various forms of user data associated with a package (ApplicationData, IndexDB, more) as well as system state cribbed and wired up when a package is installed for a user (what is the package, where's it live, that the user has it, that it's status is not tampered or otherwise unhealthy, more). The only way to truly 'reset' that to the initial state is a full remove then add.
If you just need to wipe appdata then .ClearAsync is the ticket.
I am not aware of any command that would do that for you (except for the UI available in Settings app). However, you may write a PowerShell script that would clear up the application data files in the app's folder (this is not an official solution, but seems to work based on my trials).
Go to
C:\Users\{your_username}\AppData\Local\Packages\
And find your app's folder there. There are several folders containing the application state.
The nuclear option is to just delete all the folders. Then the app will crash once on startup, then the system will automatically reset it and restore the folders.
The less invasive option I have now tried seems to be to keep the folders and just delete their content, except for the AC folder, which seems to be system protected. When I tried this with my app, it launched successfully without crashing and system recreated the state files anew on its own.
The rest of application files lives in C:\Program Files\WindowsApps, but those are just application DLLs and content files and are read-only, so they should not affect the app state at all.
You may want to perform additional deletion if you use a shared publisher folder.
For windows 10 build 2004+ there seems to be a powershell command Reset-AppxPackage now.
UPDATE
My mistake, it is available from version 20175 onward. So, should be available in 20H2.

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!

Typo3 broken: Frontend / Backend blank pages and no errors even after restoring backup

I was fixing things on a not well-maintained typo3 installation and it resulted in blank pages of frontend, backend and install tool.
I wanted to fix extensions because the powermail-extension was not working anymore even after updating to latest compatible version (tried emptying cache and database compare).
I deactivated an extension "compatibility6" to see if it was interfering and since then all pages have been blank including Install Manager. I reactivated the extension via PackageStates.php, emptied the cache but it did not change anything. I was not able to see any error messages even though I set the parameter in LocalConfiguration.php which made it hard to try to find out what is wrong. Then I restored a backup using vmware. Still, backend and frontend are blank.
I am using Apache and Typo3 7.6.23.
I do not know what might be causing the problem and would like to know what else to look for?
It means you have a PHP error there. The first thing would be to examine logs. If you see anything like "class not found", then your next action would be composer dumpautoload --no-dev.
Long time ago I had an article about blank pages in TYPO3 FE. Not up to date but still can be helpful: https://www.dmitry-dulepov.com/2009/03/blank-empty-page-in-typo3.html
Dmitry already wrote it: you have an error.
In production environment nothing is shown for not revealing any information about your system.
So the only information about the error can be found in the error log of your webserver.
What can you do to get more information about your error?
Enter the install tool and switch to develop mode. This will also enable deprecation logging into a file. Try to avoid filling your system with deprecation warnings by disabling deprecation logging.
Disable the default exceptionhandler by adding this to your typoscript setup:
config.contentObjectExceptionHandler = 0
Now you should see a call stack instead of blank screens.
Be aware that this might reveal confidential information from your system.
because of this you should use a copy of the live-system.

WHM Upgrade Blocked by EXIMUP

I am in the middle of rebuilding my VPS and I am getting an error in WHM.
CENTOS 6.5 x86_64 virtuozzo – vps-1......... WHM 11.34.2 (build 8)
Reasons for blocked updates
Please correct these issues and rerun updates.
fatal: Upgrade is blocked because EXIMUP is set to 'never' in your configuration. To proceed, you can touch file '/var/cpanel/exim.unmanaged' and run the upgrade one more time. Please refer to our documentation at http://go.cpanel.net/1136UpgradeExim for more information.
The URL for help doesn't exist.
I do not see this file in when I check for it.
I found the Exim Configuration Manager but do not see anything that matches what the error states.
I have a feeling this is fairly easy fix but I am far from an expert on VPS managing. I'm learning the hard way to put it nicely...
Does anyone know how I can clear this out so I can upgrade WHM?
I see in their documentation:
To upgrade from cPanel & WHM version 11.34 and earlier:
Touch /var/cpanel/exim.unmanaged
Run the upgrade again.
What does "Touch"mean? I tried toggling the exim option in preferences but it made no difference.
After a night of fighting this I find the answer right after I post. Here is how I solved it.
Touch means to create or modify a file without actually writing to it. So in this case since the file did not exist. I created a new file in /var/cpanel/ called 'exim.unmanaged'
After placing that file in the directory I ran the updates again and it is now upgrading WHM and cPanel.
Pros know this I am sure but hopefully this will be helpful for newbi VPS admins like myself.

build failed executing nant

I've got a nant build script (.86 beta) and it is telling me this:
BUILD FAILED
Failed to initialize the 'Microsoft
.Net Framework 2.0' target
framework.
The process cannot access the file
'C:\Users\cconway\AppData\Local\Temp\tmp25E3.tmp'
because it is being used by another
process.
This file does not even exist on my machine. Does anyone know the cause of this? Rebooting seems to allow me to run the script once successfully, but every time after that I get this message (though the name of the tmp file changes per reboot).
Thanks!
Are there any third-party tasks which might leave temp files open or keep running in the background, thus leaving file locked?
Maybe try sysinternals process monitor which will allow you to see the process which has the handle on this file.
Also, make sure that you have all the right versions of .Net installed and they are the correct ones (SDK vs Runtime). If you open the config file for nant you can see where it expects the .net version to be go check to make sure it's there and that you can see hte compiler methods (csc, vbc, etc). So it could have something that is trying to find it but it's not there or the pathing is off.
It is beta so there could even be a typo in the config file.
The answer is my anti-virus. I should have tried disabling that first! Once I disabled it, everything worked like a charm.
Hope this helps someone.