MigrationError during plone upgrading from 4.3.8 to 5.0.3 - migration

OS: debian 8.3
I upgraded partially from 4.3.8 to 5.0.3. I get stuck in migration error to Dexterity.
The process I did before upgrade in 4.3.8:
Disable all add-ons
Add a sitecustomize.py in site-package director:
import sys
sys.setdefaultencoding('utf8')
update and re-index all catalog in keti/portal_catalog/manage_main
delete 'checkout_workflow_policy' in keti/portal_properties/site_properties/manage_propertiesForm
delete all objects in /keti/reference_catalog/manage_catalogView
The process of upgrading:
1.Clean Install of Plone 5.0.3
2.Copy database from existing server (plone 4.3.8), along with blobstorage to the Plone 5.0.3 server.
3.Run upgrade
During this, all look good(report in http://pastie.org/10787693) except 2 invalid import handlers:
**Step collective.z3cform.datetimewidget has an invalid import handler
**Step languagetool has an invalid import handler
4. On the upgrade page Click “Upgrade your existing content to use Dexterity”(##pac_installer). Then I can visit the instance.
5. Click to Install dexterity. It works except a message on the topline of the page:
error while rendering plone.resourceregistries.scripts error while rendering plone.resourceregistries.styles
6. In Migration control panel page, BlobFile, Document and Folder were selected to migrate.
After a long waiting, errors pop up (http://pastie.org/10787685)
Event.log: http://pastie.org/10792956
Newest Progress:
Good news: I click on " Show country-specific language variants " in /##language-controlpanel, then select "simplified chinese" in the language list. So the problem of ConstraintNotSatisfied is resolved. Now I go back to the first problem: MigrationError: MigrationError for obj at /keti/switch/shbpsh/2010/2010ybps There is no content rules in the server and I disabled globally.)
Add-ons activated in 4.3.8: Diazo theme support, Dexterity Content Types, collective.z3cform.datetimewidget, Static resource storage
Any suggestion?
Best Regards.
Hugo

After deleted the folder cited in MigrationError, I finally upgrade the server to 5.0.4. Then I will perform a testing.

Related

Missing config.json stencil CLI

I'm trying to do some work for a client, but cannot get their bigcommerce site running locally. I have installed stencil CLI (v3.1.1) and downloaded the theme from the bigcommerce dashboard (all files). from the root of the theme i ran "stencil init", then "npm i" and "stencil start".
when i run stencil start, it throws an error saying there's no config.json file.
this is the error i get
How do i generate the config.json file?
The only config file I see is config.stencil.json.
I have also tried running "stencil pull" in hopes that it would pull the config, but it throws another error: "not ok -- Error: Could not fetch active theme details for channel 1: Request failed with status code 404"
Stencil-cli version:
3.1.1
Node version:
12
NPM version:
6.14.15
OS:
mac big sur
Stencil 3.1.1 has been deprecated for some time now. I believe the current version is 3.8. As of 4 months ago, anything below 3.5 will not run (https://developer.bigcommerce.com/changelog#publications/required-stencil-cli-version-set-to-3-5-0).
If you don't have a config.json file in your project, you will need to get the one from the client's store. Try downloading their theme again. It should come through.
Edit: It is possibly the case that you need a new API token. Try making a new one for your store. Make sure the following scopes are set:
Themes: Modify
Settings & Information: Modify
Sites & Routes: Read-only (or Modify)
Documentation for creating a new API account: https://support.bigcommerce.com/s/article/Store-API-Accounts#creating

Why does page not update after refresh when .cshtml changes

I am trying out Blazor and i do not understand why when changing a component after refreshing the browser page it does not update ? Shouldn't the client update itself similar to how angular does?
It only refreshes when i restart the blazor server.
Index.cshtml
#page "/"
<h1>Hello, world!</h1>
If i change lets say the text inside the <h1> to Hello people , i save the project and i refresh the page ( as i am advised in the Blazor tutorial) shouldn't i see Hello people ?
After Asp.net Core 3.0, Runtime compilation is enabled using the Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation package.
To enable runtime compilation, apps must:
Install the Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation NuGet package.
Update the project's Startup.ConfigureServices method to include a call to AddRazorRuntimeCompilation:
services
.AddControllersWithViews()
.AddRazorRuntimeCompilation();
or
services.AddMvc().AddRazorRuntimeCompilation();
I guess you are running the app with the debugger connected? this prevents the recompilation. You need to:
Press Ctrl-F5 to run the app without the debugger. Running with the debugger (F5) isn't supported at this time.
https://github.com/dotnet/aspnetcore/issues/5456
You should add or enable runtime compilation in razor pages,
Install-Package Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation -Version 3.1.6
After installing set the startup file as ,
services.AddMvc().AddRazorRuntimeCompilation();
do the following:
Install the Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation from NuGet.
Update the ConfigureServices method in the Startup class to look like below:
services.AddControllersWithViews().AddRazorRuntimeCompilation();
You good to go.
If you go into Tools > Options > Keyboard and search in the "Show commands containing" search box search for "BrowserLink". Find the option that says "OtherContextMenus.BrowserLink.RefreshLinkedBrowsers" by default this is set to CTRL+Alt+Enter. Click "Remove" and then select the "Press Shortcut Keys" input and press Ctrl+S. Next (just to the left of the input) change Use new shortcut in "Global" to be "Text Editor". Click "Ok" until the window has closed. Now Visual Studio shares CTRL+S with both Saving files and Refreshing linked browsers.
(This will only work if your text editor .cshtml, .css, .js, etc. files in the edit window are the active selections) WARNING: if you don't set it to something other than global then it will override the shortcut for Save and you won't be able to save your files.
Adding "services.AddMvc().AddRazorRuntimeCompilation();" and installing the Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation package 6.0.5 will fix the problem but it will ruin the "css isolation". The first thing you will notice is that the footer will lose its position

Wix installer uninstaller issue when a bundled app is skipped

I have a bundled application say XYZ-1.0.0.1.exe, with applications A-2.2.0.1.exe and B-1.2.0.1.exe bundled in it. So when we install XYZ, we get A and B as well listed in Add Remove Programs. But when I upgrade XYZ-1.0.0.1 with XYZ-1.0.0.2, which has A-2.2.0.1.exe and B-1.2.0.2.exe, so that A is same and already installed and B needs upgrade. I actually skipped the installation of A by making the install condition false, since the same version is already installed and installed only B while upgrading.
After successfully upgrading I am not able to uninstall the application XYZ, it says some package error, also this happens only if the source file used for upgrading is removed from machine.Actually while uninstalling package has to be referred from program cache, I think since we skipped A package cache has problem.
The error that i get is as follows "Prompt for source of container: WixAttachedContainer, path: C:\Users\ABC\Desktop\XYZ-1.0.0.2.exe Failed to resolve source for file: C:\Users\ABC\Desktop\XYZ-1.0.0.2.exe, error: 0x80070002. Error 0x80070002: Failed while prompting for source (original path 'C:\Users\ABC\Desktop\XYZ-1.0.0.2.exe'). Failed to acquire container: WixAttachedContainer to working path: C:\Users\ABC\AppData\Local\Temp{b4a1c780-306c-40f0-83ad7}, error: 0x80070002. "
This error occurs only when i copy XYZ.exe to any path say desktop and after installation(skip installing A or B since same version of A or B bundled is already installed) and delete the setup file XYZ.exe from saved path ie here Desktop. I am not able to uninstall unless i uninstall A or B which was skipped independently.
Also there is another scenario.
I have a bundled application say XYZ-1.0.0.1.exe, with applications A-2.2.0.1.exe and B-1.2.0.1.exe bundled in it. XYZ-1.0.0.2.exe, which has A-2.2.0.1.exe and B-1.2.0.2.exe. Thes in both versions of XYZ we have the same version of A. When i install XYZ-1.0.0.1.exe i skipped the installation of A-2.2.0.1.exe by setting the install condition to false. So XYZ-1.0.0.1.exe is installed and B-1.2.0.1 is also installed. Further when i upgraded to XYZ-1.0.0.2, I need to install all of the A and B. Installation was successfull and now i have XYZ-1.0.0.2, A-2.2.0.1 and B-1.2.0.2. Now if i delete the installation file of XYZ-1.0.0.2.exe from original path and try to uninstall it breaks.
Initially i thought that the package cache issue arises since A-2.2.0.1.exe was not installed along with XYZ-1.0.0.2.exe since i skipped it as it is already available. But after the second scenario got to know that skipping was not the issue. Since in second scenario A-2.2.0.1.exe was installed along with XYZ-1.0.0.2.exe.
The same issue took huge amount of my time as well. Solved it using a work around. Since the issue is "Prompt for source of container: WixAttachedContainer, path: ", You can copy the exe file XYZ-1.0.0.2 while upgrading to program data or some other path with a default name xyz.exe. At first register for ResolveSource event,then add the following code.Assume the copied exe path is c:/XYZ/xyz.exe
private void OnResolveSource(object sender, ResolveSourceEventArgs e)
{
Application.Engine.SetLocalSource(e.PackageOrContainerId, e.PayloadId, "c:/XYZ/xyz.exe");
e.Result = Result.Retry;
}
If anybody know a better answer, please help.

I keep getting "The following module(s) were not installed properly"

I installed prestashop successfully through your marketplace, and been able to play around with it and also to upload new modules. But every time i try to install the uploaded modules, i get this message
"The following module(s) were not installed properly:"
But the prestashop default modules do install without issues.
What is causing that problem? because the same modules were uploaded and installed without issues on cpanel shared web hosting?
Check modules sql commands for installation. I think module has an character issue. if u enable debugmode and display errors on config/defines.inc.php u can see where the error is.
If u cant solve.
Find this line on your module main php ( for "testmodule" its "testmodule.php") "if (!DB::getInstance()->execute(trim($query))) return false;" some think like that. And remove or close this line. But when u doing this u must manualy run modules sql code with phpmyadmin or something else after or before install module.
modules sql files usualy "install.sql" but some this coders add sql code on modules main phps.
This is a generic error and means that your module installation has failed.

How to load VMMaker in Squeak?

I am using Squeak 4.4 update 12327, and VM version 4.1.1. I tried to load VMMaker with ConfigurationOf scripts but always fails with exceptions mainly in the Freetype package.
Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfVMMaker';
load.
((Smalltalk at: #ConfigurationOfVMMaker) project version: '1.4') load
or
Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfVMMaker';
load.
(Smalltalk at:#ConfigurationOfVMMaker) project lastVersion load.
or
Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfVMMaker';
load.
(ConfigurationOfVMMaker project version: '1.5') load.
Neither the package repository page, nor the wiki pages (this one, or this one) include instructions or a link to load the VMMaker, although contains a lot of explanations.
This is thanks to David Lewis, in the CI scripts we use to test the Interpreter VM:
MCMcmUpdater updateFromRepositories: #('http://source.squeak.org/VMMaker').
(Smalltalk at: #VMMaker) initializeBrowserSupport. "activate Slang browsing"
Unfortunately, the Metacello configuration has been created and used only by Pharo-centric users until now...
You could eventually correct the Squeak branch in the configuration, but that ain't going to be easy to boot up from there.
If you are interested in oscog VM branch, then there is one prebuilt 4.3 image with pre-loaded packages distributed in this svn repository
http://squeakvm.org/svn/squeak/branches/Cog
Look under image subdirectory, open the CogTrunk43.image, there is a workspace explaining how the packages were loaded in the image.
If you are interested in classical Interpreter, then the way to load it was by using the update MCM:
Open a Monticello browser
Add the VMMaker repository
(MCHttpRepository
location: 'http://source.squeak.org/trunk'
user: 'squeak'
password: 'squeak')
Select and open the VMMaker repository
On the left pane, select 'update' (bottom item)
On the right pane select the top item (update-dtl.12.mcm)
Select 'browse' button
You get a list of packages displayed, click on 'Install' button
The update configuration is a few versions late though, not sure if it is still maintained, the best is also to ask on "Squeak Virtual Machine Development Discussion"
EDIT I think that this magical incantation can replace all GUI oriented operations above:
MCMcmUpdater updateFromRepositories: {'http://source.squeak.org/VMMaker'}.
Or you can open a SqueakMap package browser and load the VMMaker 'head' release. This does the same thing as loading the update from Monticello as described above. Either way you will be getting the latest version of VMMaker and related packages.