OpenStack Swift proxy-server.conf already had [filter:authtoken] section - swift

I'm trying to use swift with keystone authentication. I followed this link https://docs.openstack.org/swift/latest/overview_auth.html#keystone-auth to edit my proxy-server.conf but I noticed that at the bottom of the file [filter:authtoken] is already there, while in the comments section I can uncomment a section with the same name of [filter:authtoken], right now the bottom part looks like this:
[filter:authtoken]
include_service_catalog = False
cache = swift.cache
delay_auth_decision = 1
memcached_servers = localhost:11211
cafile = /opt/stack/data/ca-bundle.pem
project_domain_name = Default
project_name = service
user_domain_name = Default
password = 1234
username = swift
auth_url = http://10.180.204.223/identity
interface = public
auth_type = password
What should I do with it? Should I keep it, modify it according to the link, or should I uncomment the section and add the code according to the link?

Related

Undeclared arguments passed to ViewHelper Undkonsorten\Powermailpdf\ViewHelpers\Misc\VariablesViewHelper: mail

In TYPO3 9.5 using powermail with powermailpdf I'm getting the following error when submitting a form...
Undeclared arguments passed to ViewHelper Undkonsorten\Powermailpdf\ViewHelpers\Misc\VariablesViewHelper: mail.
It appears that it's complaining about mail but I don't know what to do about it. I've included the static templates for powermail followed by powermailpdf in the main TS template and see below for the mapping part of powermailpdf. I also added {downloadLink} in the RTE area for the receiver in the powermail content element and have email addresses entered there as well for the Receiver's Email and Sender's Email.
The only place I found the word mail in the docs was on this page, but it appears I don't need to do that since I'm using a powermail version greater than 3 right?
PS: I also posted this question as an issue for powermailpdf.
Relevant packages
typo3/cms-core 9.5.31
templavoilaplus/templavoilaplus 7.3.6
in2code/powermail 6.2.0
undkonsorten/powermailpdf 2.4.5
tmw/fpdm 2.9.2
TypoScript I'm using
plugin.tx_powermailpdf {
settings {
enablePowermailPdf = 1
showDownloadLink = 1
email.attachFile = 1
filelink {
jumpurl = 1
jumpurl.secure = 1
jumpurl.secure.mimeTypes = pdf=application/pdf
icon = 1
icon_link = 1
}
sourceFile = EXT:rapidfyre_estreetdrivingschool/Resources/Public/Forms/Student_Training_Record.pdf
fieldMap{
# Note the format is... pdfField = PowermailField
name = studentsname
address = address
city = city
state = state
zip = zip
gender = gender
home_number = homephone
alternate_number = alternatephone
student_cell = studentsphone
student_email = studentsemail
parent_name = parentsname
parent_email = parentsemail
high_school = highschool
birth_date = dateofbirth
permit_number = permitorid
class = class
# Hidden fields
orientation = orientation
}
}
}
Image of the first part of the error trace
EXT:powermailpdf is overriding this ViewHelper (Code).
config.tx_extbase {
objects {
In2code\Powermail\ViewHelpers\Misc\VariablesViewHelper.className = Undkonsorten\Powermailpdf\ViewHelpers\Misc\VariablesViewHelper
}
}
But the classes seems not match (in these versions):
https://github.com/einpraegsam/powermail/blob/6.2.0/Classes/ViewHelpers/Misc/VariablesViewHelper.php
https://github.com/undkonsorten/powermailpdf/blob/2.4.5/Classes/ViewHelpers/Misc/VariablesViewHelper.php
So, a call of this VH (possibly also from the normal Powermail templates) will hit a non-compatible version of the ViewHelper.

How to recover superuser after using recovery script?

Background
I had to apply the recovery script (https://github.com/splitbrain/dokuwiki-recover, 93fce60, 31. Aug. 2020) because the wiki did not work after installation of plugin "code3".?
I followed the instructions that appeared when executing the script, in which one step were saying:
Change the superuser configuration back to contain your usual admin account
Question
How to perform the mentioned step ("Change the superuser configuration back to contain your usual admin account")?
In order to perform the mentioned step ("Change the superuser configuration back to contain your usual admin account"), the file local.php in folder "/config" has to be changed to
<?php
/**
* Dokuwiki's Main Configuration File - Local Settings
* Auto-generated by install script
* Date: ...
*/
$conf['title'] = '<YourDokuWikiName>';
$conf['lang'] = '<YourLanguage>';
$conf['license'] = '<YourDokuWikiLicense>';
$conf['useacl'] = 1;
$conf['superuser'] = '#admin';
$conf['disableactions'] = 'register';
...by removing the lines that have been added by the recover script
// The following lines were added be dokuwiki-recover
// 2021-...
$conf['useacl'] = 1;
$conf['authtype'] = 'authplain';
$conf['superuser'] = '#dokuwiki-recover';
$conf['userewrite'] = 0;
$conf['lang'] = 'en';
$conf['template'] = 'dokuwiki';
The obvious reason is that the last php assignment wins, and hence...
$conf['superuser'] = '#dokuwiki-recover';
...made all users of group dokuwiki-recover to adminintrators.

TYPO3 direct_mail_subscription Double-Opt-In-Out not activ

I am using extension direct_mail and direct_mail_subscription for newsletter. In the settings it is clear that i should first confirm the address, so the adress should be in the database as hidden.
// Create setup
create = 1
create {
userFunc_afterSave = EXT:direct_mail_subscription/pi/class.dmailsubscribe.php:user_dmailsubscribe->saveRecord
preview = 0
// add captcha, if you use captcha
fields = gender, name, hidden, email, module_sys_dmail_category, module_sys_dmail_html
required = gender, name, email
noSpecialLoginForm = 1
# Initially hide the user until he approves!
overrideValues.hidden = 1
evalValues.email = uniqueLocal, email
}
so the field hidden in the database should be in the begining 1, however, all data are set to 0 without confirming the address.
Typo3 Version 8.7.2. What should the reason be? Do you have an idea?
Make sure that you have included the static TypoScript template in your own TypoScript template:
You can verify that it is included in the TypoScript Object Browser:

How to automatically update charts linked to Google Sheets?

I have a Google Slides presentation with charts that are linked to a specific Google Sheets Spreadsheet.
As there are many charts in the presentation, I'm looking for a way to update all these linked charts automatically, or at least all of them at once.
What is the best way to do this?
You can add a custom function to a dropdown menu in the Slides UI with the following script. This gets the slides from the current presentation, loops through them, gets any charts in each slides and refreshes (updates) them.
function onOpen() {
var ui = SlidesApp.getUi();
ui.createMenu('Custom Menu')
.addItem('Batch Update Charts', 'batchUpdate')
.addToUi();
}
function batchUpdate(){
var gotSlides = SlidesApp.getActivePresentation().getSlides();
for (var i = 0; i < gotSlides.length; i++) {
var slide = gotSlides[i];
var sheetsCharts = slide.getSheetsCharts();
for (var k = 0; k < sheetsCharts.length; k++) {
var shChart = sheetsCharts[k];
shChart.refresh();
}
}
}
Note: The functionality to update/refresh linked Slides doesn't appear to exist at the time of this response.
You can find it in official documentation about API (for different lang).
https://developers.google.com/slides/how-tos/add-chart#refreshing_a_chart
You need to write a script for this and run it by schedule or manually.
I have found my own code that worked great.
from __future__ import print_function
import httplib2
import os
from apiclient import discovery
from oauth2client import client
from oauth2client import tools
from oauth2client.file import Storage
try:
import argparse
flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args()
except ImportError:
flags = None
# If modifying these scopes, delete your previously saved credentials
# at ~/.credentials/slides.googleapis.com-python-quickstart.json
SCOPES = 'https://www.googleapis.com/auth/drive'
CLIENT_SECRET_FILE = 'client_secret.json'
APPLICATION_NAME = 'Google Slides API Python Quickstart'
def get_credentials():
"""Gets valid user credentials from storage.
If nothing has been stored, or if the stored credentials are invalid,
the OAuth2 flow is completed to obtain the new credentials.
Returns:
Credentials, the obtained credential.
"""
home_dir = os.path.expanduser('~')
credential_dir = os.path.join(home_dir, '.credentials')
if not os.path.exists(credential_dir):
os.makedirs(credential_dir)
credential_path = os.path.join(credential_dir,
'slides.googleapis.com-python-quickstart.json')
store = Storage(credential_path)
credentials = store.get()
if not credentials or credentials.invalid:
flow = client.flow_from_clientsecrets(CLIENT_SECRET_FILE, SCOPES)
flow.user_agent = APPLICATION_NAME
if flags:
credentials = tools.run_flow(flow, store, flags)
else: # Needed only for compatibility with Python 2.6
credentials = tools.run(flow, store)
print('Storing credentials to ' + credential_path)
return credentials
def main():
"""Shows basic usage of the Slides API.
Creates a Slides API service object and prints the number of slides and
elements in a sample presentation:
"""
credentials = get_credentials()
http = credentials.authorize(httplib2.Http())
service = discovery.build('slides', 'v1', http=http)
# Here past your presentation id
presentationId = '1Owma9l9Z0Xjm1OPp-fcchdcxc1ImBPY2j9QH1LBDxtk'
presentation = service.presentations().get(
presentationId=presentationId).execute()
slides = presentation.get('slides')
print ('The presentation contains {} slides:'.format(len(slides)))
for slide in slides:
for element in slide['pageElements']:
presentation_chart_id = element['objectId']
# Execute the request.
try:
requests = [{'refreshSheetsChart': {'objectId': presentation_chart_id}}]
body = {'requests': requests}
#print(element)
requests = service.presentations().batchUpdate(
presentationId=presentationId, body=body).execute()
print('Refreshed a linked Sheets chart with ID: {0}'.format(presentation_chart_id))
except Exception:
pass
if __name__ == '__main__':
main()
Latest update: There is now an option in Slides's Tools drop-down menu to see all Linked Objects; the menu that appears has the option at the bottom to "Update all".

how to make routing URL for our wish in zendframework using routes.ini file?

I need to the routing URL like the following
http://www.website.com/module-name/controller-name/{article-name}/{article-id}
i tried using the routes.ini file but it's not working
routes.index-latest.route = "index/latest/$1/:id"
routes.index-latest.module = "index"
routes.index-latest.defaults.controller = "latest"
routes.index-latest.defaults.action = "index"
routes.index-latest.defaults.id = ""
can you anyone suggest me on the issues or please tell me any other way to achieve the URL like through bootstrap file.
i searched on the net but i am not getting the right solution.
i fixed myself like example #
routes.index-latest.route = "index/latest/:article_id"
routes.index-latest.defaults.module = "module-name"
routes.index-latest.defaults.controller = "controller-name"
routes.index-latest.defaults.action = "action-name"
routes.index-latest.defaults.article_id = ""
routes.index-latest.defaults.reqs.article_id = "\d+{1,}"
in routes.ini