Closed sumerjabri closed 4 years ago
There appears to be a bug in the deployment/get-available-publishing-channels.json
API.
Making a request to a brand new editorial site for example:
/studio/api/1/services/api/1/deployment/get-available-publishing-channels.json?site=test
Returns
{
"availableUpdateStatusChannels": [],
"availablePublishChannels": []
}
@dejan-brkic now that we have 1 or 2 real publishing targets: Staging and Live (Staging may be turned off), we should have some configuration/constants that drive that API call. Do we have such a configuration already? Ping me to discuss.
Please update to
site-config.xml
remove the lines
<staging-environment>staging</staging-environment>
<live-environment>live</live-environment>
<enable-staging-environment>false</enable-staging-environment>
mean that Staging is enabled/disabled completelysite-config.xml
to UM and all BPs
<!-- Site URLs. Default to http://localhost:8080 if blank -->
<site-urls>
<authoring-url></authoring-url>
<staging-url></staging-url>
<live-url></live-url>
</site-urls>
and populate the data from environment-config.xml
or engine/proxy-config.xml
, check with @jdrossl on the best choice here given that UM ran before this and updated it. Perhaps remove that UM construct and change it to the above.
@yacdaniel please validate and test to make sure we didn't break anything @alhambrav please document the new settings (in site-config now)
@alhambrav this doc use the environment-config-xml
as example https://docs.craftercms.org/en/3.2/site-administrators/studio/multi-environment-configurations.html Please update it to use another xml config example
@dejan-brkic in this section for site-config
<!-- Site URLs. Default to http://localhost:8080 if blank -->
<site-urls>
<authoring-url></authoring-url>
<staging-url></staging-url>
<live-url></live-url>
</site-urls>
The notifications send by studio are not using the localhost:8080
as default value
Here is a snippet for Content Review email template
p>
author author has submitted items for your review:
<ul>
<a href="/preview/#/?page=/technology&site=ed">
<li>Technology</li>
</a>
notice the missing studio url at the start of the href.
@dejan-brkic please also see this:
[INFO] 2020-05-18T12:00:00,148 [pool-4-thread-10] [core.JobRunShell] | Job DEFAULT.craftercms:/scripts/jobs/every-day/content-monitoring.groovy threw a JobExecutionException:
org.quartz.JobExecutionException: Error executing script job at /scripts/jobs/every-day/content-monitoring.groovy
at org.craftercms.engine.scripting.impl.ScriptJob.execute(ScriptJob.java:63) ~[classes/:3.1.7-SNAPSHOT]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.3.2.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_252]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_252]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]
Caused by: org.craftercms.engine.exception.ScriptException: No signature of method: com.sun.proxy.$Proxy46.getAuthoringServerUrl() is applicable for argument types: (java.lang.String) values: [ed2]
at org.craftercms.engine.scripting.impl.GroovyScript.execute(GroovyScript.java:74) ~[classes/:3.1.7-SNAPSHOT]
at org.craftercms.engine.scripting.impl.ScriptJob.execute(ScriptJob.java:61) ~[classes/:3.1.7-SNAPSHOT]
... 4 more
Caused by: groovy.lang.MissingMethodException: No signature of method: com.sun.proxy.$Proxy46.getAuthoringServerUrl() is applicable for argument types: (java.lang.String) values: [ed2]
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:71) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:48) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128) ~[groovy-all-2.4.15.jar:2.4.15]
at scripts.api.impl.content.ContentMonitoring$_doContentMonitoringForSite_closure2.doCall(ContentMonitoring.groovy:63) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_252]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_252]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98) ~[groovy-all-2.4.15.jar:2.4.15]
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264) ~[groovy-all-2.4.15.jar:2.4.15]
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034) ~[groovy-all-2.4.15.jar:2.4.15]
at groovy.lang.Closure.call(Closure.java:418) ~[groovy-all-2.4.15.jar:2.4.15]
at groovy.lang.Closure.call(Closure.java:434) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2125) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2110) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2151) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.dgm$163.invoke(Unknown Source) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128) ~[groovy-all-2.4.15.jar:2.4.15]
at scripts.api.impl.content.ContentMonitoring.doContentMonitoringForSite(ContentMonitoring.groovy:62) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_252]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_252]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98) ~[groovy-all-2.4.15.jar:2.4.15]
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:352) ~[groovy-all-2.4.15.jar:2.4.15]
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:68) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:157) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:185) ~[groovy-all-2.4.15.jar:2.4.15]
at scripts.api.impl.content.ContentMonitoring$_doMonitoringForAllSites_closure1.doCall(ContentMonitoring.groovy:32) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_252]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_252]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98) ~[groovy-all-2.4.15.jar:2.4.15]
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264) ~[groovy-all-2.4.15.jar:2.4.15]
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034) ~[groovy-all-2.4.15.jar:2.4.15]
at groovy.lang.Closure.call(Closure.java:418) ~[groovy-all-2.4.15.jar:2.4.15]
at groovy.lang.Closure.call(Closure.java:434) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2125) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2110) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2163) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.dgm$165.invoke(Unknown Source) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128) ~[groovy-all-2.4.15.jar:2.4.15]
at scripts.api.impl.content.ContentMonitoring.doMonitoringForAllSites(ContentMonitoring.groovy:29) ~[?:?]
at scripts.api.impl.content.ContentMonitoring$doMonitoringForAllSites.call(Unknown Source) ~[?:?]
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) ~[groovy-all-2.4.15.jar:2.4.15]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:136) ~[groovy-all-2.4.15.jar:2.4.15]
at content-monitoring.run(content-monitoring.groovy:19) ~[?:?]
at org.craftercms.engine.scripting.impl.GroovyScript.execute(GroovyScript.java:72) ~[classes/:3.1.7-SNAPSHOT]
at org.craftercms.engine.scripting.impl.ScriptJob.execute(ScriptJob.java:61) ~[classes/:3.1.7-SNAPSHOT]
... 4 more```
Updates for @yacdaniel notes PR: https://github.com/craftercms/studio/pull/2002 https://github.com/craftercms/studio/pull/2003
@dejan-brkic please remove in bin/apache-tomcat/shared/classes/crafter/studio/extension/studio-config-override.yaml
the section about environment-config that is no longer needed.
##################################################
## Content Repository ##
##################################################
# Absolute path to repository base (all actual repositories will be under this)
studio.repo.basePath: ${env:CRAFTER_DATA_DIR}/repos
# Sandbox git repository branch for every site
# studio.repo.siteSandboxBranch: master
# If not using environment-config.xml, environments are configured here
# Git repository branch for the `live` environment, default "live"
# studio.repo.published.live: live
# Git repository branch for the `staging` environment, default "staging"
# studio.repo.published.staging: staging
Verified.
We retiring this file and using the new proxy system instead. Please remove all reliance on the file
environment-config.xml
.For UI: Make sure you only use
origin/
ororigin/studio
as your base URL, no need to do anything else, the proxy should handle the rest.The UM work to remove the file from existing sites is handled on a different ticket.
Related to: