Can't create a site collection through SharePoint Managment Shell for SharePoint 2010 - sharepoint-2010

I tried to run the same commands as in here -https://technet.microsoft.com/en-us/library/cc263165(v=office.14).aspx .
$template = Get-SPWebTemplate "STS#0"
New-SPSite -Url "http://web-application-name/sitecollection1" -OwnerAlias "domain\administrator" -Template $template
I am getting the following error:
New-SPSite : A site collection could not be created as the provided managed pat
h does not exist. Change the URL to use an existing managed path or create the
missing managed path prior to calling this command.
What does this error mean? What am i missing?

1.$template = Get-SPWebTemplate "STS#0"
if you are getting error upon running this command use this link https://support.microsoft.com/en-us/help/2796733/sharepoint-2010-management-shell-does-not-load-with-windows-powershell-3.0
to fix it
2.Create a managed path
New-SPManagedPath -RelativeURL "sitecollection1" -WebApplic ation "web-application-name"
3.Create the site collection
New-SPSite -URL "http://web-application-name/sites/sitecollection1"-OwnerAlias "domain\administrator" -Template $template
It is not very clear for my how to create a site collection with a path like:
http://web-application-name/sitecollection2
But this solution worked for what i needed.

Related

AWS Lambda package-deployed functions require() of a relative path, not found

I have a zip file containing the following structure (this is the root of the archive, not nested in a top-level folder, which I understand is a common cause of errors for aws-s3-lambda deployments):
- support/
- shared.js
- one.js
- two.js
and then in one.js and two.js:
var shared = require("./support/shared");
// ...
When I run this code locally, it works. I use the aws-sdk to upload the zip file to AWS-S3 and then use aws.lambda.createFunction() to create a function with that name and handler and everything. The created function DOES show up in my Lambda dashboard, but when I test it, I get "Cannot find module './support/shared'". I have also tried var shared = require("./support/shared.js"); and that gives "Cannot find module './support/shared.js'".
This is for runtime node6.10. The filename cases are correct for case-sensitive lambda.
Shouldn't this work?? What's the gotcha?
Is there a way to verify the file structure that Lambda is working in to show that the additional ./support/shared.js file actually made it to the working directory or whatever it uses?
The gotcha is that the zip file created on a windows machine has the wrong chmod permissions set in it for when AWS unpacks it. The files are there, but inaccessible but node just gives a generic warning about not found instead of that the folder access is denied.

Geb/Spock Error- No reports dir has been configured, you need to set in the config file or via the build adapter

I have trouble running my functional test from IntelliJ IDE. When I run the functional test, I got the following error message:
java.lang.IllegalStateException: No reports dir has been configured, you need to set in the config file or via the build adapter.
at geb.Browser.getReportGroupDir(Browser.groovy:899)
at geb.Browser.cleanReportGroupDir(Browser.groovy:932)
at geb.spock.GebSpec.methodMissing(GebSpec.groovy:56)
at geb.spock.GebReportingSpec.setupSpec(GebReportingSpec.groovy:37)
Based on my research, all I need to do is to add the following code in GebConfig.groovy:
reportsDir = new File("target/runtime_reports_dir")
I added the line to GebConfig.groovy and rebuild the project, but still running into the same issue. Is there any other fix to this error?
Adding reportsDir = 'target/geb-reports' to your GebConfig shoud fix this, can you show me your GebConfig file?
There is also another fix for it, your test class extends GebReportingSpec, you can chage it to GebSpec and it should also work.
I had this same issue, while having the reportsDir correctly configured in the GebConfig
Adding the resources folder (where my GebConfig is located) as "Test Sources Root" did the trick for me
To mark the folder as "Test Sources Root":
Right click in the folder
Mark Directory as
Test Sources Root
Happy testing!

ClickOnce running an error when publishing Application

whenever I try to publish my application and it gives me this error:
Failed to connect to '\localhost\users\Dylan Garcia\Desktop\8.2.1_File\' with the following error: unable to create the Web site '\localhost\users\Dylan Garcia\Desktop\8.2.1_File\'. The path '\localhost\users\Dylan Garcia\Desktop\8.2.1_File\' does not exist or you do not have access. The specified path is invalid.
how could i resolve this issue?
Hope you have already fixed this error.
First make sure that you have created the folder 8.2.1_File on your desktop, then try either one of the following
\\\localhost\users\Dylan Garcia\Desktop\8.2.1_File\
or
C:\users\Dylan Garcia\Desktop\8.2.1_File\

Phalcon Dev Tools - Builder doesn't knows where is the models directory

I'm getting "Builder doesn't knows where is the models directory" error when I run the phalcon all-models command in both Command Line and Phalcon Webtools.
Please let me know what am I missing?
My webtools.config.php content
define('PTOOLS_IP', '216.174.134.2');
define('PTOOLSPATH', '/var/www/html/vendor/phalcon/devtools');
My webtools.php content
use Phalcon\Web\Tools;
require 'webtools.config.php';
require PTOOLSPATH . '/scripts/Phalcon/Web/Tools.php';
Tools::main(PTOOLSPATH, PTOOLS_IP);
My config.ini content
[database]
adapter = Mysql
host = localhost
username = test
password = test
dbname = test
[application]
controllersDir = ../app/controllers/
modelsDir = ../app/models/
viewsDir = ../app/views/
pluginsDir = ../app/plugins/
libraryDir = ../app/library/
cacheDir = ../app/cache/
baseUri = /
[models]
metadata.adapter = "Memory"
I have change the modelsDir from ../app/models/ to /../app/models/ but still not working.
ANSWER FOUND:
Going to project root directory and type the command (instructions)
# phalcon all-models --directory /var/www/html/projec_name
I speficied the --directory which is the Base path on which project will be created.
Thank you colburton for helping me debug this problem. Much appreciated.
Going to project root directory and type the command (instructions)
# phalcon all-models --directory /var/www/html/projec_name
I speficied the --directory which is the Base path on which project will be created.
Thank you colburton for helping me debug this problem. Much appreciated.
In the options array you pass to the builder you need to add 'modelsDir' with the correct path.
On this page you can find a video with the webtools. There is a tab for "Configuration", where you can set them.
It is also located in the config.ini under app/config
I am using Phalcon 3. After generating a project with phalcon console tool I encountered this error.
There is an easy way out to resolve this issue. Change the following settings in app/config/config.ini if you have one.
[application]
controllersDir = app/controllers/
modelsDir = app/models/
viewsDir = app/views/
pluginsDir = app/plugins/
libraryDir = app/library/
cacheDir = ../cache/

Custom Cartridge

I want to create a cartridge for OpenERP, i create one for Python 2.6.6, it's work, and i try to modifie the setup to execute "openerp-server" but i dont know where i can put the openERP code ? Where i puting him in the "Template" folder it gives my this error :
Unable to complete the requested operation due to: The server
ex-std-node295.prod.rhcloud.com that your application is running on
failed to respond in time. This may be due to a system restart..
Reference ID: 377355d1a4f3f9cc0d1914cca77dace9
Also I modified the /bin/setup like this :
Call openerp-server
exec $OPENSHIFT_PYTHON_DIR/cdk/Template/openerp-server
Also when I connect in SSH I don't find my template folder.
How do I fix this?
Openshift Origin has annoying timeout hardcoded in one gem of itself.
Find line 1006 in the following file:
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.26.3.1/app/models/rest_api/base.rb
The default timeout is set in the following line (line 1006):
self.read_timeout = 240
Other timeouts can be setuped due to documentation.
I have a working quickstart here: https://github.com/caruccio/openshift-openerp-quickstart/blob/master/README_en.md
You could use this code to your template dir. Please not it is "template", not "Template".