How to move Google Drive folder into specific alphabetic folder within make.com - make.com

I have very limited coding skills so I used make.com for automation purpose. I have automated our client onboarding process but there are two things I cant achieve.
When a new client is onboarded, a new folder in our google drive is created. this folder is named "client name - city". Our client folders are organized in folders "drive/client/a" ; "drive/client/b" etc. What I want to achieve, is that the folder gets moved into the right folder (Example: Client Folder is "Tesla Inc" it should be moved into "drive/client/t"
I have tried ChatGPT and this is the script it sent me:
# Zielordner basierend auf dem Anfangsbuchstaben des Ordners bestimmen
destination_folders = {
'A': '456def', # ID des Ordners für den Buchstaben "A"
'B': '789ghi', # ID des Ordners für den Buchstaben "B"
# ... weitere Einträge für alle Buchstaben des Alphabets ...
}
first_letter = folder_name[0]
destination_folder_id = destination_folders.get(first_letter, None)
if destination_folder_id is None:
print(f'Kein Zielordner gefunden für den Anfangsbuchstaben {first_letter}. Der Ordner wird nicht verschoben.')
else:
# Ordner in Zielordner verschieben
file_metadata = {
'parents': [destination_folder_id]
}
try:
result = drive_service.files().update(fileId=new_folder_id, body=file_metadata).execute()
print(f'Ordner {new_folder_id} wurde in den Ordner {destination_folder_id} verschoben.')
except HttpError as error:
print(f'Fehler beim Verschieben des Ordners: {error}')
I have already created an google sheet with all IDs to every letter of the alphabet. This can easily be implemented into the script, but Im not sure, how to solve this problem and move to the next step. Can anyone help?
Cheers
Ismar
I have tried several modules within make.com but none of them had the functionality I needed. I also tried to perform a google sheet function to solve this, but always ended up not knowing how to implement this into make.com

Related

How to set flexed items to full width, except for some?

Have a look at https://jsfiddle.net/dwgrxo35/19/
What I want to achieve is:
a full width heading,
image to the left (if there is one)- first paragraph to the right, bottom aligned with the image
the rest flows normally with blocks being blocks and inlines being inlines.
pseudo markdown:
|h1 |
|fig|1st p|
|short p |
|ul |
|p |
|p |
I cannot restructure the HTML, it comes from markdown.
It works, if I have no short content blocks but items numbered 3 and 4 disturb this peace.
Any ideas?
main {
width: 800px;
display: flex;
flex-wrap: wrap;
align-items: flex-end;
background-color: aliceblue;
}
main>* {
margin: 0 1em 1em 0;
background-color: lightgoldenrodyellow;
}
main>figure:first-of-type {
flex: 1;
}
main>p:first-of-type {
flex: 1;
}
figcaption {
text-align: center;
}
<main>
<h1>Eine Seite, um den Flow zu flowen</h1>
<figure>
<img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fgw3IWyGkC0rsazTi%2F200.gif&f=1&nofb=1">
<figcaption>1. Das ist 2018 herum.</figcaption>
</figure>
<p>2. The President shall have at Least one Representative. In all the other Cases before mentioned, the supreme Court shall have been elected, and he shall have at Least one Representative. Note: Changed by the Eleventh Amendment. To borrow money on the
credit of the States, and will to the best of my Ability, preserve, protect and defend the Constitution of the United States, reserving to the other House, by which it shall not be suspended, unless when in Cases of Rebellion or Invasion the public
Safety may require the Opinion in writing, of the Persons voting for and against the United States shall guarantee to every State in which he was elected, be appointed to any Office or public Trust under the Authority of the State where the said Crimes
shall have the Qualifications requisite for Electors of the most numerous Branch of the land and naval Forces.
</p>
<p>3. Kurz.</p>
<ul>
<li>4. List</li>
<li>List</li>
<li>List</li>
</ul>
<figure>
<img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fgw3IWyGkC0rsazTi%2F200.gif&f=1&nofb=1">
<figcaption>5. Das ist so 2018 herum.</figcaption>
</figure>
<p>6. Als Kreditengagement gelten in diesem Zusammenhang sind die Begriffe „illiquide Sicherheiten“ und „ausserbörsliches Derivat, das nicht ohne Weiteres ersetzt werden kann, gilt für den überwiegenden Teil ihrer Geschäftsaktivitäten über eine IMMZulassung
verfügen, aber für sich allein nicht aus. Diese Einheit muss die Integrität der zur Durchführung von Nachschussforderungen verwendeten Daten prüfen und sicherstellen, dass sie ihre Anforderungen für das antizyklische Kapitalpolster als den gewichteten
Durchschnitt der Anforderungen in den Ländern, in denen keine tägliche Preisfeststellung erfolgt sowie Instrumente, für die CVARisikokapitalanforderung gegen die CVA aufgerechnet werden. In der Bilanz ausgewiesene Verbindlichkeiten im Zusammenhang
mit leistungsorientierten Pensionsfonds sind bei der Ermittlung des harten Kernkapitals in voller Höhe abgezogen werden. Ebenso ergibt sich der Betrag, der in Bezug auf Bedienungsrechte von Hypotheken abzuziehen ist, als die Summe sämtlicher Beteiligungspositionen,
die insgesamt mehr als 10% des harten Kernkapitals („Common Equity Tier 1“, CET1) einhalten müssen. Dementsprechend ergibt sich der Wert der des Aktivums mindern sollte oder falls sie nach einschlägigen Rechnungslegungsstandards auszubuchen wäre.
Übersteigt die Summe sämtlicher Positionen, die insgesamt mehr als 10% des harten Kernkapitals der Bank (wie oben beschrieben) ausmachen, multipliziert mit dem Risikogewicht versehen werden, das sie als unmittelbares Eigentum der Bank (wie oben beschrieben)
ausmachen, multipliziert mit dem prozentualen Anteil der gesamten Kapitalpositionen entspricht, der auf hartes Kernkapital entfällt.
</p>
<p>7. If all of this may seem marvelous, but it's realistic! Imagine a combination of OWL and PHP. The capability to implement wirelessly leads to the ability to iterate virtually. We understand that it is better to e-enable intuitively than to morph intuitively.
Without C2C, you will lack social networks. We will enlarge our ability to iterate virtually. The capability to implement wirelessly leads to the awards page of the pudding is in the industry, but our one-to-one, customer-defined, robust C2C2C M&A
and user-proof use. The capability to implement wirelessly leads to the capacity to enable perfectly leads to the capacity to synthesize interactively. We believe we know that if you incentivize proactively then you may also mesh iteravely. Our feature
set is unparalleled in the industry, but our non-complex administration and user-proof configuration is usually considered a remarkable achievement taking into account this month's financial state of things! If all of this may seem incredible to you,
that's because it is! What does it really mean to optimize 'vertically'? Without robust, web-enabled, 60/60/24/7/365 implementation supervising, you will lack architectures. We will revalue our aptitude to incubate without reducing our capability
to upgrade. Without development, you will lack experiences. Imagine a combination of Perl and FOAF.
</p>
<p>8. Kurz.</p>
</main>
100% width for the h1, width: calc(100% ... minus the width of the #1 image, and some other details concerning flex-grow/shrink do what you describe (see fiddle)
https://jsfiddle.net/j8sy19wb/
main {
width: 800px;
display: flex;
flex-wrap: wrap;
align-items: flex-end;
background-color: aliceblue;
}
main>* {
margin: 0 1em 1em 0;
background-color: lightgoldenrodyellow;
align-items: flex-end;
}
figcaption {
text-align: center;
}
main>figure:first-of-type {
flex-grow: 0;
}
h1 {
width: 100%;
}
main>*:nth-child(3) {
width: calc(100% - 300px);
}
<main>
<h1>Eine Seite, um den Flow zu flowen</h1>
<figure>
<img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fgw3IWyGkC0rsazTi%2F200.gif&f=1&nofb=1">
<figcaption>1. Das ist 2018 herum.</figcaption>
</figure>
<p>2. The President shall have at Least one Representative. In all the other Cases before mentioned, the supreme Court shall have been elected, and he shall have at Least one Representative. Note: Changed by the Eleventh Amendment. To borrow money on the
credit of the States, and will to the best of my Ability, preserve, protect and defend the Constitution of the United States, reserving to the other House, by which it shall not be suspended, unless when in Cases of Rebellion or Invasion the public
Safety may require the Opinion in writing, of the Persons voting for and against the United States shall guarantee to every State in which he was elected, be appointed to any Office or public Trust under the Authority of the State where the said Crimes
shall have the Qualifications requisite for Electors of the most numerous Branch of the land and naval Forces.
</p>
<p>3. Kurz.</p>
<ul>
<li>4. List</li>
<li>List</li>
<li>List</li>
</ul>
<figure>
<img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fgw3IWyGkC0rsazTi%2F200.gif&f=1&nofb=1">
<figcaption>5. Das ist so 2018 herum.</figcaption>
</figure>
<p>6. Als Kreditengagement gelten in diesem Zusammenhang sind die Begriffe „illiquide Sicherheiten“ und „ausserbörsliches Derivat, das nicht ohne Weiteres ersetzt werden kann, gilt für den überwiegenden Teil ihrer Geschäftsaktivitäten über eine IMMZulassung
verfügen, aber für sich allein nicht aus. Diese Einheit muss die Integrität der zur Durchführung von Nachschussforderungen verwendeten Daten prüfen und sicherstellen, dass sie ihre Anforderungen für das antizyklische Kapitalpolster als den gewichteten
Durchschnitt der Anforderungen in den Ländern, in denen keine tägliche Preisfeststellung erfolgt sowie Instrumente, für die CVARisikokapitalanforderung gegen die CVA aufgerechnet werden. In der Bilanz ausgewiesene Verbindlichkeiten im Zusammenhang
mit leistungsorientierten Pensionsfonds sind bei der Ermittlung des harten Kernkapitals in voller Höhe abgezogen werden. Ebenso ergibt sich der Betrag, der in Bezug auf Bedienungsrechte von Hypotheken abzuziehen ist, als die Summe sämtlicher Beteiligungspositionen,
die insgesamt mehr als 10% des harten Kernkapitals („Common Equity Tier 1“, CET1) einhalten müssen. Dementsprechend ergibt sich der Wert der des Aktivums mindern sollte oder falls sie nach einschlägigen Rechnungslegungsstandards auszubuchen wäre.
Übersteigt die Summe sämtlicher Positionen, die insgesamt mehr als 10% des harten Kernkapitals der Bank (wie oben beschrieben) ausmachen, multipliziert mit dem Risikogewicht versehen werden, das sie als unmittelbares Eigentum der Bank (wie oben beschrieben)
ausmachen, multipliziert mit dem prozentualen Anteil der gesamten Kapitalpositionen entspricht, der auf hartes Kernkapital entfällt.
</p>
<p>7. If all of this may seem marvelous, but it's realistic! Imagine a combination of OWL and PHP. The capability to implement wirelessly leads to the ability to iterate virtually. We understand that it is better to e-enable intuitively than to morph intuitively.
Without C2C, you will lack social networks. We will enlarge our ability to iterate virtually. The capability to implement wirelessly leads to the awards page of the pudding is in the industry, but our one-to-one, customer-defined, robust C2C2C M&A
and user-proof use. The capability to implement wirelessly leads to the capacity to enable perfectly leads to the capacity to synthesize interactively. We believe we know that if you incentivize proactively then you may also mesh iteravely. Our feature
set is unparalleled in the industry, but our non-complex administration and user-proof configuration is usually considered a remarkable achievement taking into account this month's financial state of things! If all of this may seem incredible to you,
that's because it is! What does it really mean to optimize 'vertically'? Without robust, web-enabled, 60/60/24/7/365 implementation supervising, you will lack architectures. We will revalue our aptitude to incubate without reducing our capability
to upgrade. Without development, you will lack experiences. Imagine a combination of Perl and FOAF.
</p>
</main>

Long filenames not working with png device. Troubleshoot and workaround suggestions

Creating a png file with the png device fails because of long filenames but the names are shorter than the supported size according to documentation.
I am creating graphs from various subsets of hierarchical data in a dataframe with the treemap library. For a better overview i create file directories mirroring that hierarchical structure and save each graph in the corresponding directory.
I have written a function that removes illegal characters and specific german characters that seem to trouble the png device. However the most recent error message seems to be related to the length of the filename in the png command. According to the documentation the maximum length of the filename is 511 characters which i am not close to. I have three questions
Is the length of the filename really the issue?
If so, why when the length is considerably lower than it has to be according to documentation?
What would be a elegant, suitable workaround?
Breite<-1366
Hohe<-768
###This works:
png(file="b4-Kapitel 4- Funktionen des kardiovaskulaeren,
haematologischen, Immun- und Atmungssystems_1366x768.png",
width=Breite,
height=Hohe)
png(file="ICFGrafiken/Klassifikation der Koerperfunktionen/Kapitel 4-
Funktionen des kardiovaskulaeren, haematologischen, Immun- und
Atmungssystems/b4-Kapitel 4_1366x768.png",
width=Breite,
height=Hohe)
###This doesn't work:
png(file="ICFGrafiken/Klassifikation der Koerperfunktionen/Kapitel 4-
Funktionen des kardiovaskulaeren, haematologischen, Immun- und
Atmungssystems/b4-Kapitel 4- Funktionen des kardiovaskulaeren,
haematologischen, Immun- und Atmungssystems_1366x768.png",
width=Breite,
height=Hohe)
The error message is:
Error in png(file = "ICFGrafiken/Klassifikation der Koerperfunktionen/Kapitel 4- Funktionen des kardiovaskulaeren, haematologischen, Immun- und Atmungssystems/b4-Kapitel 4- Funktionen des kardiovaskulaeren, haematologischen, Immun- und Atmungssystems_1366x768.png", :
kann png()-Gerät nicht starten
In addition: Warning messages:
1: In png(file = "ICFGrafiken/Klassifikation der Koerperfunktionen/Kapitel 4- Funktionen des kardiovaskulaeren, haematologischen, Immun- und Atmungssystems/b4-Kapitel 4- Funktionen des kardiovaskulaeren, haematologischen, Immun- und Atmungssystems_1366x768.png", :
kann Datei 'ICFGrafiken/Klassifikation der Koerperfunktionen/Kapitel 4- Funktionen des kardiovaskulaeren, haematologischen, Immun- und Atmungssystems/b4-Kapitel 4- Funktionen des kardiovaskulaeren, haematologischen, Immun- und Atmungssystems_1366x768.png' nicht zum Schreiben öffnen
2: In png(file = "ICFGrafiken/Klassifikation der Koerperfunktionen/Kapitel 4- Funktionen des kardiovaskulaeren, haematologischen, Immun- und Atmungssystems/b4-Kapitel 4- Funktionen des kardiovaskulaeren, haematologischen, Immun- und Atmungssystems_1366x768.png", :
opening device failed
The Problem is not related to RStudio or the png command. Windows has a 260 character limit for filepaths.
Credit goes to the linked Question:
Long path/filename in windows makes write.table() error out in R
So there are 3 possible Solutions (or combinations of these 3)
Manually enable the LongPath support with Windows 10 by Editing the
registry (which i did but this seems not enough and an entirely new
Problem)
Setting up a virtual drive as suggested in the answer above, to gain a certain amount of "breathing room" (unlikely to get me
enough)
Using shorthands for the Titles and Labels and providing the full description only in the application where they are used and needed.
Seems like Nr.3 for me.
Thanks to everyone who contributed.

Filter not working in the magnolia cms delivery endpoint

I am trying to use filter to query the delivery endpoint API as mentioned in the below doc
https://documentation.magnolia-cms.com/display/DOCS56/Delivery+endpoint+API#DeliveryendpointAPI-queryNodes-filterFilters
The filter is not working and I am getting the complete content of the page in the JSON response. I am getting all the nodes instead of the specified node
I even tried to use the #name property filter, still I get the entire content instead of that particular node
curl -X GET "http://localhost:8080/magnoliaAuthor/.rest/delivery/website/v1/travel/hello?#name=03
my rest endpoint yaml configuration is as follows
class: info.magnolia.rest.delivery.jcr.v1.JcrDeliveryEndpointDefinition
params:
website:
depth: 2
nodeTypes:
- mgnl:page
- mgnl:area
- mgnl:component
childNodeTypes:
- mgnl:area
- mgnl:component
rootPath: /
workspace: website
includeSystemProperties: false
I did the test in the demo (https://demoauthor.magnolia-cms.com) and it works.
I created this file:
class: info.magnolia.rest.delivery.jcr.v1.JcrDeliveryEndpointDefinition
params:
website:
depth: 2
nodeTypes:
- mgnl:page
- mgnl:area
- mgnl:component
childNodeTypes:
- mgnl:area
- mgnl:component
rootPath: /
workspace: website
includeSystemProperties: false
Into this path: /travel-demo/restEndpoints/restTest.yaml (in the Resources App)
Then I queried the first component from the main area of the About page at:
https://demoauthor.magnolia-cms.com/.rest/delivery/website/v1/travel/about/main/00
With this result:
{"#name":"00","#path":"/travel/about/main/00","#id":"01db6fc1-78af-4284-adf0-8c997309df6a","#nodeType":"mgnl:component","text":"<p>We are a full service, independent travel agency.</p>\n<p>We offer unique tours from every continent on the planet. Get inspired and book your tour with us for an experience you’ll always remember.</p> ","text_de":"<p>Wir sind eine unabhängige Reiseagentur mit Rundumservice.</p>\n<p>Wir bieten einzigartige Reisen für jeden Kontinent der Erde an. Lassen Sie sich inspirieren und buchen Sie Ihre Reise bei uns, um Erfahrungen zu machen, die Ihnen für immer in Erinnerung bleiben werden.</p> ","jcr:createdBy":"admin","headline_de":"Über Magnolia Travels","mgnl:lastActivatedBy":"superuser","mgnl:template":"travel-demo:components/jumbotron","mgnl:lastActivated":"2015-10-27T13:50:52.396+0100","jcr:created":"2018-01-23T22:33:44.55+0100","mgnl:created":"2015-02-02T20:23:37.199+0100","imagePosition":"below","headlineLevel":"small","mgnl:createdBy":"superuser","headline":"About Magnolia Travels","mgnl:lastModified":"2015-06-18T11:08:06.983+0200","mgnl:activationStatus":"true","mgnl:lastModifiedBy":"superuser","#nodes":[]}
And then I queried the entire page at:
https://demoauthor.magnolia-cms.com/.rest/delivery/website/v1/travel/about/
With this result:
{"#name":"about","#path":"/travel/about","#id":"808ebe4c-72b2-49f1-b9f7-e7db22bce02f","#nodeType":"mgnl:page","jcr:createdBy":"admin","hideInNav":"false","mgnl:template":"travel-demo:pages/standard","mgnl:lastActivatedBy":"superuser","mgnl:lastActivated":"2018-01-23T22:33:55.104+0100","jcr:created":"2018-01-23T22:33:44.53+0100","mgnl:created":"2015-02-02T17:34:28.816+0100","mgnl:createdBy":"superuser","title":"About","title_de":"Über uns","mgnl:lastModified":"2015-10-27T13:50:28.322+0100","mgnl:activationStatus":"true","mgnl:lastModifiedBy":"superuser","main":{"#name":"main","#path":"/travel/about/main","#id":"f3b2681f-e747-4ff6-bcbb-2a9a9f01553e","#nodeType":"mgnl:area","mgnl:createdBy":"superuser","jcr:createdBy":"admin","mgnl:lastModified":"2015-10-27T13:50:28.322+0100","mgnl:activationStatus":"true","mgnl:lastActivatedBy":"superuser","jcr:created":"2018-01-23T22:33:44.54+0100","mgnl:lastActivated":"2015-10-27T13:50:52.396+0100","mgnl:lastModifiedBy":"superuser","mgnl:created":"2015-02-02T17:34:34.651+0100","00":{"#name":"00","#path":"/travel/about/main/00","#id":"01db6fc1-78af-4284-adf0-8c997309df6a","#nodeType":"mgnl:component","text":"<p>We are a full service, independent travel agency.</p>\n<p>We offer unique tours from every continent on the planet. Get inspired and book your tour with us for an experience you’ll always remember.</p> ","text_de":"<p>Wir sind eine unabhängige Reiseagentur mit Rundumservice.</p>\n<p>Wir bieten einzigartige Reisen für jeden Kontinent der Erde an. Lassen Sie sich inspirieren und buchen Sie Ihre Reise bei uns, um Erfahrungen zu machen, die Ihnen für immer in Erinnerung bleiben werden.</p> ","jcr:createdBy":"admin","headline_de":"Über Magnolia Travels","mgnl:lastActivatedBy":"superuser","mgnl:template":"travel-demo:components/jumbotron","mgnl:lastActivated":"2015-10-27T13:50:52.396+0100","jcr:created":"2018-01-23T22:33:44.55+0100","mgnl:created":"2015-02-02T20:23:37.199+0100","imagePosition":"below","headlineLevel":"small","mgnl:createdBy":"superuser","headline":"About Magnolia Travels","mgnl:lastModified":"2015-06-18T11:08:06.983+0200","mgnl:activationStatus":"true","mgnl:lastModifiedBy":"superuser","#nodes":[]},"04":{"#name":"04","#path":"/travel/about/main/04","#id":"834ef0b0-1519-4834-b1f5-4166ae004ac0","#nodeType":"mgnl:component","jcr:createdBy":"admin","layout":"8x4","mgnl:lastActivatedBy":"superuser","mgnl:template":"travel-demo:components/columnLayout","mgnl:lastActivated":"2015-10-27T13:50:52.397+0100","jcr:created":"2018-01-23T22:33:44.56+0100","mgnl:created":"2015-10-27T12:03:30.193+0100","mgnl:createdBy":"superuser","mgnl:lastModified":"2015-10-27T13:50:28.322+0100","mgnl:activationStatus":"true","mgnl:lastModifiedBy":"superuser","#nodes":[]},"#nodes":["00","04"]},"footer":{"#name":"footer","#path":"/travel/about/footer","#id":"21da1190-52e6-45d5-8e68-5a2878733d6c","#nodeType":"mgnl:area","mgnl:createdBy":"superuser","jcr:createdBy":"admin","mgnl:lastModified":"2015-06-18T17:43:12.575+0200","mgnl:activationStatus":"true","mgnl:lastActivatedBy":"superuser","mgnl:lastActivated":"2015-10-27T13:50:52.400+0100","jcr:created":"2018-01-23T22:33:44.63+0100","mgnl:created":"2015-02-02T17:34:34.666+0100","mgnl:lastModifiedBy":"superuser","footer1":{"#name":"footer1","#path":"/travel/about/footer/footer1","#id":"7b1bb2e5-4a96-46ba-9e37-213d49bd874f","#nodeType":"mgnl:area","mgnl:createdBy":"superuser","jcr:createdBy":"admin","mgnl:lastModified":"2015-02-26T16:27:05.82+0100","mgnl:activationStatus":"true","mgnl:lastActivatedBy":"superuser","jcr:created":"2018-01-23T22:33:44.64+0100","mgnl:lastActivated":"2015-10-27T13:50:52.400+0100","mgnl:lastModifiedBy":"superuser","mgnl:created":"2015-02-26T16:27:05.82+0100","#nodes":[]},"footer2":{"#name":"footer2","#path":"/travel/about/footer/footer2","#id":"847f6b8c-a997-4c1a-ad7f-00c777351f32","#nodeType":"mgnl:area","mgnl:createdBy":"superuser","jcr:createdBy":"admin","mgnl:lastModified":"2015-02-26T16:27:05.109+0100","mgnl:activationStatus":"true","mgnl:lastActivatedBy":"superuser","mgnl:lastActivated":"2015-10-27T13:50:52.400+0100","jcr:created":"2018-01-23T22:33:44.65+0100","mgnl:created":"2015-02-26T16:27:05.109+0100","mgnl:lastModifiedBy":"superuser","#nodes":[]},"footer3":{"#name":"footer3","#path":"/travel/about/footer/footer3","#id":"8d80386e-d6b7-489b-881a-b50a391fc08e","#nodeType":"mgnl:area","mgnl:createdBy":"superuser","jcr:createdBy":"admin","mgnl:lastModified":"2015-02-26T16:27:05.138+0100","mgnl:activationStatus":"true","mgnl:lastActivatedBy":"superuser","jcr:created":"2018-01-23T22:33:44.66+0100","mgnl:lastActivated":"2015-10-27T13:50:52.400+0100","mgnl:created":"2015-02-26T16:27:05.138+0100","mgnl:lastModifiedBy":"superuser","#nodes":[]},"footer4":{"#name":"footer4","#path":"/travel/about/footer/footer4","#id":"83939ec7-c633-4bc0-a2f0-e874ac64b327","#nodeType":"mgnl:area","mgnl:createdBy":"superuser","jcr:createdBy":"admin","mgnl:lastModified":"2015-02-26T16:27:05.155+0100","mgnl:activationStatus":"true","mgnl:lastActivatedBy":"superuser","mgnl:lastActivated":"2015-10-27T13:50:52.401+0100","jcr:created":"2018-01-23T22:33:44.66+0100","mgnl:created":"2015-02-26T16:27:05.155+0100","mgnl:lastModifiedBy":"superuser","#nodes":[]},"lastLinks":{"#name":"lastLinks","#path":"/travel/about/footer/lastLinks","#id":"5a9f3338-a98d-4797-b35e-0d9f10550a1e","#nodeType":"mgnl:area","mgnl:createdBy":"superuser","jcr:createdBy":"admin","mgnl:lastModified":"2015-06-18T17:43:12.583+0200","mgnl:activationStatus":"true","mgnl:lastActivatedBy":"superuser","mgnl:lastActivated":"2015-10-27T13:50:52.401+0100","jcr:created":"2018-01-23T22:33:44.67+0100","mgnl:created":"2015-06-18T17:43:12.583+0200","mgnl:lastModifiedBy":"superuser","#nodes":[]},"#nodes":["footer1","footer2","footer3","footer4","lastLinks"]},"#nodes":["main","footer"]}
So in my opinion everything is OK.
I would check the path you are requesting. It's probably wrong.
Using the JCR browser helps on this.
Greetings

Alfresco ScriptNode function getAspectsShort is missing/undefined

First of all, I am running V4.2.e Community Edition.
I have the following webscript/free marker template(ftl) to retrieve aspects from a certain node,
[
<#list node.aspects as aspect>
${jsonUtils.toJSONString(aspect)}<#if aspect_has_next>, </#if>
</#list>
]
with the following js part:
var docid = url.extension;
model.node = search.findNode(docid);
It works perfectly. It returns something like:
[
"http://www.alfresco.org/model/content/1.0}titled"
]
but I want:
[
"cm:titled"
]
In the following ScriptNode API I found a similar function called "getAspectsShort":Alfresco Community 4.2 Documentation - Script Node
Obviously there are backend functions in the java classes:
ScriptNode.java
My tried to use it in the following way:
[
<#list node.getAspectsShort as aspect>
${jsonUtils.toJSONString(aspect)}<#if aspect_has_next>, </#if>
</#list>
]
and found the following message in the catalina.out:
Caused by: org.alfresco.service.cmr.repository.TemplateException: 011933961 Fehler bei der Verarbeitung der Mustervorlage 'Expression node.getAspectsShort is undefined on line 2, column 12 in aspe
ct.get.json.ftl.'. Bitte wenden Sie sich an Ihren Systemadministrator.
at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:222)
at org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:896)
at org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)
... 28 more
Caused by: freemarker.core.InvalidReferenceException: Expression node.getAspectsShort is undefined on line 2, column 12 in aspect.get.json.ftl.
at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:100)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.Environment.process(Environment.java:199)
at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:218)
... 31 more
Any help will be appreciated,
Oliver
Hi you're referring to the JavaScript API but you're using the Freemarker objects to retrieve data. So not all the JavaScript methods are implemented in Freemarker.
So use the node.aspectsShort in your JavaScript controller and pass the value to the model object to the Freemarker template.
Here is the reference wiki of the Template node API
And the reference in the docs
You can use shortQName
${shortQName(jsonUtils.toJSONString(aspect))}
http://docs.alfresco.com/4.0/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Freferences%2FAPI-JS-Utility-shortQName.html

Qmail : auto response is polluted with email headers

When I set up auto response in qmailadmin for an account. The auto response email is sent but just after the auto response message, there is a sort of stack trace and headers of the original message:
like :
Received: (qmail 903 invoked by uid 508); 12 Jul 2010 20:23:55 -0000
Received: blabla
Received: (qmail 914 invoked from network); 12 Jul 2010 20:31:44 -0000
Received: from blabla (ip)
somemore trace like DKIM-Signature, etc...
*original message headers*
*original message content*
Is there a way to not have all this junk in the body of the email ? My users are not very happy with it... (It used to work well in the past, and I didn't change any thing recently)
If you have an idea of what happens, you are answers are welcome !
thanks !
I assume, that you are using the qmail-autoresponder. To check what is going wrong, I need two additional informations at the moment:
1) Content of the .qmail file with the responder
There should be something like this inside:
|qmail-autoresponder /path/to/autorespond/dir
2) The content of the autorespond directory - especially the message.txt
You can check, if the message.txt is in a correct MIME-format. It should look something like this:
From: "Sender of Mail" <email#yourhost.de>
User-Agent: autoresponder-system
Return-Path: <>
Subject: Re: %S
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Sehr geehrte Damen und Herren,
Diese Emailadresse wird in den kommenden Wochen abgeschaltet. Wir m=F6chten
Sie bitten, sich zuk=FCnftig an Ihren neuen Ansprechpartner ...
Finally I made it works be updating autorespond to the latest version (2.0.2) I don't know what version I had ...
autorespond: usage: time num message dir [ flag arsender ]
optional parameters:
flag - handling of original message:
0 - append nothing
1 - append quoted original message without attachments
Add 0 in .qmail file:
/home/vpopmail/domains/mydomain.com/myuser/Maildir/ | /usr/local/bin/autorespond 86400 3 /home/vpopmail/domains/mydomain.com/myuser/vacation/message /home/vpopmail/domains/mydomain.com/myuser//vacation 0

Resources