We are trying to show rewarded video ads in our game.
But we are getting this response for the test device/user.
{
code = 1;
message = "An unknown error has occurred.";
type = OAuthException;
url = "https://graph.facebook.com/network_ads_common/";
}
Here are the logs for the request. (Ad request Parameters)
1.AFP = b4e920
2.ALLOWS_ARBITRARY_LOADS = 1
3.APPBUILD = 29
4.APPVERS = 1.0.0
5.BUNDLE = 'my game bundle'
6.COCOS2D = 0
7.COPPA = 0
8. CORE_AFP = 54351be8
9.DENSITY = 2
10.HEIGHT = 0
11.IDFA = 5E57F11A-C663-4FAB-B9F7-DE6F7246AA84
12.IDFA_FLAG = 1
13.LOCALE = en_AM
14. M_BANNER_KEY = 'some key here'
15.MAKE = Apple
16.MEDIATION_SERVICE =
17.MODEL = iPad7,2
18.NETWORK_TYPE = 1
19.NUM_ADS_REQUESTED = 1
20.ORIENTATION = 3
21.OS = iOS
22.OSVERS = 12.1.4
23.PLACEMENT_ID = VID_HD_16_9_15S_APP_INSTALL#my_live_placement_id
24.REQUEST_TIME = 1553694293.090104
25.ROOTED = 1
26.SCREEN_HEIGHT = 768
27.SCREEN_WIDTH = 1024
28.SDK = ios
29.SDK_CAPABILITY = [3,4,5,7,9,10,12,16,17]
30.SDK_VERSION = 5.1.0
31.SESSION_ID = 5268043A-BF88-4B94-A773-833396087D5D
32.SESSION_TIME = 15.50397801399231
33.TEMPLATE_ID = 400
34.TEST_MODE = 1
35.UNITY = 0
36.VOLUME = 0.5
37.WIDTH = 0
The platform is iOS.
Any suggestions about what is going wrong?
Thanks for your help.
Related
Create customer payment profile using API.
Getting error:
E00003
The element 'paymentProfiles' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' cannot contain text. List of
possible elements expected: 'customerType, billTo, payment,
driversLicense, taxId, defaultPaymentProfile' in namespace
'AnetApi/xml/v1/schema/AnetApiSchema.xsd'
Request to Authorize.net
<AuthorizeNet::API::CreateCustomerProfileRequest:0x007fc91d9e48a8 #merchantAuthentication=nil, #refId=nil, #profile=#<AuthorizeNet::API::CustomerProfileType:0x007fc91d9e4880 #merchantCustomerId="jdoe6607", #description="John2 Doe", #email="2686#mail.com", #paymentProfiles=[#<AuthorizeNet::API::CustomerPaymentProfileType:0x007fc91d9e4ab0 #customerType="individual", #billTo=#<AuthorizeNet::API::CustomerAddressType:0x007fc91d9e4c68 #firstName="Ellen", #lastName="Johnson", #company="Souveniropolis", #address="14 Main Street", #city="Pecan Springs", #state="TX", #zip="44628", #country="US", #phoneNumber="999-999-9999", #faxNumber="999-999-9999">, #payment=#<AuthorizeNet::API::PaymentType:0x007fc91d9e4d80 #creditCard=#<AuthorizeNet::API::CreditCardType:0x007fc91d9e4da8 #cardNumber="4111111111111111", #expirationDate="2020-05", #cardCode="111", #isPaymentToken=nil, #cryptogram=nil>, #bankAccount=nil, #trackData=nil, #encryptedTrackData=nil, #payPal=nil, #opaqueData=nil>, #driversLicense=nil, #taxId=nil>], #shipToList=[#<AuthorizeNet::API::CustomerAddressType:0x007fc91d9e4a60 #firstName="John", #lastName="Snow", #company="Night's Watch, Inc.", #address="Castle Black", #city="The Wall", #state="North Westeros", #zip="99499", #country="Westeros", #phoneNumber="999-999-9999", #faxNumber="999-999-9999">]>, #validationMode="liveMode">
Code:
transaction = Transaction.new(api_login_id, api_transaction_key, :gateway => :sandbox)
payment = PaymentType.new(CreditCardType.new)
payment.creditCard.cardNumber = '4111111111111111'
payment.creditCard.expirationDate = '2020-05'
billTo = CustomerAddressType.new
billTo.firstName = "Ellen"
billTo.lastName = "Johnson"
billTo.company = "Souveniropolis"
billTo.address = "14 Main Street"
billTo.city = "Pecan Springs"
billTo.state = "TX"
billTo.zip = "44628"
billTo.country = "US"
billTo.phoneNumber = "999-999-9999"
billTo.faxNumber = "999-999-9999"
paymentProfile = CustomerPaymentProfileType.new
paymentProfile.payment = payment
paymentProfile.billTo = billTo
shippingAddress = CustomerAddressType.new
shippingAddress.firstName = "John"
shippingAddress.lastName = "Snow"
shippingAddress.company = "Night's Watch, Inc."
shippingAddress.address = "Castle Black"
shippingAddress.city = "The Wall"
shippingAddress.state = "North Westeros"
shippingAddress.zip = "99499"
shippingAddress.country = "Westeros"
shippingAddress.phoneNumber = "999-999-9999"
shippingAddress.faxNumber = "999-999-9999"
request = CreateCustomerProfileRequest.new
request.profile = CustomerProfileType.new
request.profile.merchantCustomerId = 'jdoe' + rand(10000).to_s
request.profile.description = 'John2 Doe'
request.profile.email = rand(10000).to_s + '#mail.com'
request.profile.paymentProfiles = [paymentProfile]
request.profile.shipToList = [shippingAddress]
request.validationMode = ValidationModeEnum::LiveMode
response = transaction.create_customer_profile(request)
I am using 2.6.4-1. Since rundeck logs dont archive or rotate themselves or don't drop a conf into logrotate with the installation; what is the best way to rotate and archive it..?
I can manually drop a config into logrotate so it can rotate and archive it, may be I can use copytruncate since Java apps (such as Rundeck) usually ignore UNIX signals like SIGHUP and SIGUSR1 but what stopping me using logrotate is, rundeck is trying to rotate the logs with appending a date stamp and keeping it there without archiving.This makes logrotate not working as expected. Since the size of the logs keep on growing, any alternatives for rundeck log rotation,archiving.
Or help me on how to avoid rundeck to try rotate the logs with appending a date stamp into the log name. Like rundeck.access.log turns to rundeck.access.log.2017-06-02 which makes logrotate to not working on archiving it.
Thanks in advance.
Leo Prince
As you already know that Rundeck uses log4f as its application logging facility. All logging is controlled by log4j. The log config file is RD_BASE/log4j.properties or RD_BASE/etc/log4j.properties if you are using launcher.
If you look into your log4j.properties file. You will find for the config for all files that appear under /var/log/rundeck/ directory have following setting:
log4j.appender.cmd-logger=org.apache.log4j.DailyRollingFileAppender
log4j.appender.cmd-logger.file=/var/log/rundeck/command.log
log4j.appender.cmd-logger.datePattern='.'yyyy-MM-dd
log4j.appender.cmd-logger.append=true
log4j.appender.cmd-logger.layout=org.apache.log4j.PatternLayout
log4j.appender.cmd-logger.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c - %m%n
org.apache.log4j.DailyRollingFileAppender makes log file rotate dailly.
The log file name will have a dateParttern as '.'yyyy-MM-dd
log4j log rotation and archive
TimeBasedRollingPolicy
The setting you are looking for is FileNamePattern
Here is an example on how to log rotate and archive using log4j
How to make log files rotate per day and zip old rotated logs using log4j.properties
The previous answer doesn't seem to work in log4j2. Here is my log4j2.properties file that rotates the archived logs every 2 days:
name = Rundeck Logging Configuration
property.baseDir = /var/log/rundeck
property.classLength = 2
property.noConsoleNoAnsi = true
property.prefix = [%style{%d{ISO8601}}{dim, noConsoleNoAnsi=${noConsoleNoAnsi}}] %highlight{%-5p}{noConsoleNoAnsi=${noConsoleNoAnsi}} %style{%c{${classLength}}}{cyan,noConsoleNoAnsi=${noConsoleNoAnsi}}
appender.console.type = Console
appender.console.name = STDOUT
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = ${prefix} - %m%n
appender.rundeck.type = RollingFile
appender.rundeck.name = rundeck
appender.rundeck.fileName = ${baseDir}/rundeck.log
appender.rundeck.append = true
appender.rundeck.bufferedIO = true
appender.rundeck.filePattern = ${baseDir}/rundeck.log.%d{yyyy-MM-dd}.gz
appender.rundeck.layout.type = PatternLayout
appender.rundeck.layout.pattern = ${prefix} [%t] - %m%n
appender.rundeck.policies.type = Policies
appender.rundeck.policies.time.type = TimeBasedTriggeringPolicy
appender.rundeck.policies.time.interval = 1
appender.rundeck.strategy.type = DefaultRolloverStrategy
appender.rundeck.strategy.delete.type = Delete
appender.rundeck.strategy.delete.basePath = ${baseDir}
appender.rundeck.strategy.delete.maxDepth = 1
appender.rundeck.strategy.delete.ifFileName.type = IfFileName
appender.rundeck.strategy.delete.ifFileName.glob = rundeck.log.*.gz
appender.rundeck.strategy.delete.ifLastModified.type = IfLastModified
appender.rundeck.strategy.delete.ifLastModified.age = 2d
appender.audit.type = RollingFile
appender.audit.name = audit
appender.audit.fileName = ${baseDir}/rundeck.audit.log
appender.audit.append = true
appender.audit.bufferedIO = true
appender.audit.filePattern = ${baseDir}/rundeck.audit.log.%d{yyyy-MM-dd}.gz
appender.audit.layout.type = PatternLayout
appender.audit.layout.pattern = ${prefix} - %m%n
appender.audit.policies.type = Policies
appender.audit.policies.time.type = TimeBasedTriggeringPolicy
appender.audit.policies.time.interval = 1
appender.audit.strategy.type = DefaultRolloverStrategy
appender.audit.strategy.delete.type = Delete
appender.audit.strategy.delete.basePath = ${baseDir}
appender.audit.strategy.delete.maxDepth = 1
appender.audit.strategy.delete.ifFileName.type = IfFileName
appender.audit.strategy.delete.ifFileName.glob = rundeck.audit.log.*.gz
appender.audit.strategy.delete.ifLastModified.type = IfLastModified
appender.audit.strategy.delete.ifLastModified.age = 2d
appender.options.type = RollingFile
appender.options.name = options
appender.options.fileName = ${baseDir}/rundeck.options.log
appender.options.append = true
appender.options.bufferedIO = true
appender.options.filePattern = ${baseDir}/rundeck.options.log.%d{yyyy-MM-dd}.gz
appender.options.layout.type = PatternLayout
appender.options.layout.pattern = ${prefix} %X{httpStatusCode} %X{contentLength}B %X{durationTime}ms %X{lastModifiedDateTime} [%X{jobName}] %X{url} %X{contentSHA1}%n
appender.options.policies.type = Policies
appender.options.policies.time.type = TimeBasedTriggeringPolicy
appender.options.policies.time.interval = 1
appender.options.strategy.type = DefaultRolloverStrategy
appender.options.strategy.delete.type = Delete
appender.options.strategy.delete.basePath = ${baseDir}
appender.options.strategy.delete.maxDepth = 1
appender.options.strategy.delete.ifFileName.type = IfFileName
appender.options.strategy.delete.ifFileName.glob = rundeck.options.log.*.gz
appender.options.strategy.delete.ifLastModified.type = IfLastModified
appender.options.strategy.delete.ifLastModified.age = 2d
appender.storage.type = RollingFile
appender.storage.name = storage
appender.storage.fileName = ${baseDir}/rundeck.storage.log
appender.storage.append = true
appender.storage.bufferedIO = true
appender.storage.filePattern = ${baseDir}/rundeck.storage.log.%d{yyyy-MM-dd}.gz
appender.storage.layout.type = PatternLayout
appender.storage.layout.pattern = ${prefix} %X{action} %X{type} %X{path} %X{status} %X{metadata}%n
appender.storage.policies.type = Policies
appender.storage.policies.time.type = TimeBasedTriggeringPolicy
appender.storage.policies.time.interval = 1
appender.storage.strategy.type = DefaultRolloverStrategy
appender.storage.strategy.delete.type = Delete
appender.storage.strategy.delete.basePath = ${baseDir}
appender.storage.strategy.delete.maxDepth = 1
appender.storage.strategy.delete.ifFileName.type = IfFileName
appender.storage.strategy.delete.ifFileName.glob = rundeck.storage.log.*.gz
appender.storage.strategy.delete.ifLastModified.type = IfLastModified
appender.storage.strategy.delete.ifLastModified.age = 2d
appender.jobchanges.type = RollingFile
appender.jobchanges.name = jobchanges
appender.jobchanges.fileName = ${baseDir}/rundeck.jobs.log
appender.jobchanges.append = true
appender.jobchanges.bufferedIO = true
appender.jobchanges.filePattern = ${baseDir}/rundeck.jobs.log.%d{yyyy-MM-dd}.gz
appender.jobchanges.layout.type = PatternLayout
appender.jobchanges.layout.pattern = ${prefix} %X{user} %X{change} [%X{id}] %X{project} "%X{groupPath}/%X{jobName}" (%X{method})%X{extraInfo}%n
appender.jobchanges.policies.type = Policies
appender.jobchanges.policies.time.type = TimeBasedTriggeringPolicy
appender.jobchanges.policies.time.interval = 1
appender.jobchanges.strategy.type = DefaultRolloverStrategy
appender.jobchanges.strategy.delete.type = Delete
appender.jobchanges.strategy.delete.basePath = ${baseDir}
appender.jobchanges.strategy.delete.maxDepth = 1
appender.jobchanges.strategy.delete.ifFileName.type = IfFileName
appender.jobchanges.strategy.delete.ifFileName.glob = rundeck.jobs.log.*.gz
appender.jobchanges.strategy.delete.ifLastModified.type = IfLastModified
appender.jobchanges.strategy.delete.ifLastModified.age = 2d
appender.execevents.type = RollingFile
appender.execevents.name = execevents
appender.execevents.fileName = ${baseDir}/rundeck.executions.log
appender.execevents.append = true
appender.execevents.bufferedIO = true
appender.execevents.filePattern = ${baseDir}/rundeck.executions.log.%d{yyyy-MM-dd}.gz
appender.execevents.layout.type = PatternLayout
appender.execevents.layout.pattern = ${prefix} %X{eventUser} %X{event} [%X{id}:%X{state}] %X{project} %X{user}/%X{abortedby} \"%X{groupPath}/%X{jobName} %X{argString}\"[%X{uuid}] %n
appender.execevents.policies.type = Policies
appender.execevents.policies.time.type = TimeBasedTriggeringPolicy
appender.execevents.policies.time.interval = 1
appender.execevents.strategy.type = DefaultRolloverStrategy
appender.execevents.strategy.delete.type = Delete
appender.execevents.strategy.delete.basePath = ${baseDir}
appender.execevents.strategy.delete.maxDepth = 1
appender.execevents.strategy.delete.ifFileName.type = IfFileName
appender.execevents.strategy.delete.ifFileName.glob = rundeck.executions.log.*.gz
appender.execevents.strategy.delete.ifLastModified.type = IfLastModified
appender.execevents.strategy.delete.ifLastModified.age = 2d
appender.apirequests.type = RollingFile
appender.apirequests.name = apirequests
appender.apirequests.fileName = ${baseDir}/rundeck.api.log
appender.apirequests.append = true
appender.apirequests.bufferedIO = true
appender.apirequests.filePattern = ${baseDir}/rundeck.api.log.%d{yyyy-MM-dd}.gz
appender.apirequests.layout.type = PatternLayout
appender.apirequests.layout.pattern = ${prefix} "%X{method} %X{uri}" %X{remoteHost} %X{secure} %X{remoteUser} %X{authToken} %X{duration} %X{project} (%X{userAgent})%n
appender.apirequests.policies.type = Policies
appender.apirequests.policies.time.type = TimeBasedTriggeringPolicy
appender.apirequests.policies.time.interval = 1
appender.apirequests.strategy.type = DefaultRolloverStrategy
appender.apirequests.strategy.delete.type = Delete
appender.apirequests.strategy.delete.basePath = ${baseDir}
appender.apirequests.strategy.delete.maxDepth = 1
appender.apirequests.strategy.delete.ifFileName.type = IfFileName
appender.apirequests.strategy.delete.ifFileName.glob = rundeck.api.log.*.gz
appender.apirequests.strategy.delete.ifLastModified.type = IfLastModified
appender.apirequests.strategy.delete.ifLastModified.age = 2d
appender.access.type = RollingFile
appender.access.name = access
appender.access.fileName = ${baseDir}/rundeck.access.log
appender.access.append = true
appender.access.bufferedIO = true
appender.access.filePattern = ${baseDir}/rundeck.access.log.%d{yyyy-MM-dd}.gz
appender.access.layout.type = PatternLayout
appender.access.layout.pattern = ${prefix} "%X{method} %X{uri}" %X{remoteHost} %X{secure} %X{remoteUser} %X{authToken} %X{duration} %X{project} [%X{contentType}] (%X{userAgent})%n
appender.access.policies.type = Policies
appender.access.policies.time.type = TimeBasedTriggeringPolicy
appender.access.policies.time.interval = 1
appender.access.strategy.type = DefaultRolloverStrategy
appender.access.strategy.delete.type = Delete
appender.access.strategy.delete.basePath = ${baseDir}
appender.access.strategy.delete.maxDepth = 1
appender.access.strategy.delete.ifFileName.type = IfFileName
appender.access.strategy.delete.ifFileName.glob = rundeck.access.log.*.gz
appender.access.strategy.delete.ifLastModified.type = IfLastModified
appender.access.strategy.delete.ifLastModified.age = 2d
appender.project.type = RollingFile
appender.project.name = project
appender.project.fileName = ${baseDir}/rundeck.project.log
appender.project.append = true
appender.project.bufferedIO = true
appender.project.filePattern = ${baseDir}/rundeck.project.log.%d{yyyy-MM-dd}.gz
appender.project.layout.type = PatternLayout
appender.project.layout.pattern = ${prefix} - %m%n
appender.project.policies.type = Policies
appender.project.policies.time.type = TimeBasedTriggeringPolicy
appender.project.policies.time.interval = 1
appender.project.strategy.type = DefaultRolloverStrategy
appender.project.strategy.delete.type = Delete
appender.project.strategy.delete.basePath = ${baseDir}
appender.project.strategy.delete.maxDepth = 1
appender.project.strategy.delete.ifFileName.type = IfFileName
appender.project.strategy.delete.ifFileName.glob = rundeck.project.log.*.gz
appender.project.strategy.delete.ifLastModified.type = IfLastModified
appender.project.strategy.delete.ifLastModified.age = 2d
appender.cleanup.type = RollingFile
appender.cleanup.name = cleanup
appender.cleanup.fileName = ${baseDir}/rundeck.cleanup.log
appender.cleanup.append = true
appender.cleanup.bufferedIO = true
appender.cleanup.filePattern = ${baseDir}/rundeck.cleanup.log.%d{yyyy-MM-dd}.gz
appender.cleanup.layout.type = PatternLayout
appender.cleanup.layout.pattern = ${prefix} - %m%n
appender.cleanup.policies.type = Policies
appender.cleanup.policies.time.type = TimeBasedTriggeringPolicy
appender.cleanup.policies.time.interval = 1
appender.cleanup.strategy.type = DefaultRolloverStrategy
appender.cleanup.strategy.delete.type = Delete
appender.cleanup.strategy.delete.basePath = ${baseDir}
appender.cleanup.strategy.delete.maxDepth = 1
appender.cleanup.strategy.delete.ifFileName.type = IfFileName
appender.cleanup.strategy.delete.ifFileName.glob = rundeck.cleanup.log.*.gz
appender.cleanup.strategy.delete.ifLastModified.type = IfLastModified
appender.cleanup.strategy.delete.ifLastModified.age = 2d
appender.webhooks.type = RollingFile
appender.webhooks.name = webhooks
appender.webhooks.fileName = ${baseDir}/rundeck.webhooks.log
appender.webhooks.append = true
appender.webhooks.bufferedIO = true
appender.webhooks.filePattern = ${baseDir}/rundeck.webhooks.log.%d{yyyy-MM-dd}.gz
appender.webhooks.layout.type = PatternLayout
appender.webhooks.layout.pattern = ${prefix} - %m%n
appender.webhooks.policies.type = Policies
appender.webhooks.policies.time.type = TimeBasedTriggeringPolicy
appender.webhooks.policies.time.interval = 1
appender.webhooks.strategy.type = DefaultRolloverStrategy
appender.webhooks.strategy.delete.type = Delete
appender.webhooks.strategy.delete.basePath = ${baseDir}
appender.webhooks.strategy.delete.maxDepth = 1
appender.webhooks.strategy.delete.ifFileName.type = IfFileName
appender.webhooks.strategy.delete.ifFileName.glob = rundeck.webhooks.log.*.gz
appender.webhooks.strategy.delete.ifLastModified.type = IfLastModified
appender.webhooks.strategy.delete.ifLastModified.age = 2d
rootLogger.level = warn
rootLogger.appenderRef.stdout.ref = STDOUT
rootLogger.appenderRef.rundeck.ref = rundeck
logger.interceptors.name = rundeck.interceptors
logger.interceptors.level = info
logger.interceptors.additivity = false
logger.interceptors.appenderRef.stdout.ref = STDOUT
logger.rundeckapp.name = rundeckapp
logger.rundeckapp.level = info
logger.rundeckapp.additivity = false
logger.rundeckapp.appenderRef.stdout.ref = STDOUT
logger.bootstrap.name = rundeckapp.BootStrap
logger.bootstrap.level = info
logger.bootstrap.additivity = false
logger.bootstrap.appenderRef.stdout.ref = STDOUT
logger.grails.name = grails
logger.grails.level = warn
logger.grails.additivity = false
logger.grails.appenderRef.stdout.ref = STDOUT
logger.grails_env.name = grails.util.Environment
logger.grails_env.level = error
logger.grails_env.additivity = false
logger.grails_env.appenderRef.stdout.ref = STDOUT
logger.prjmanager.name = grails.app.services.rundeck.services.ProjectManagerService
logger.prjmanager.level = info
logger.prjmanager.additivity = false
logger.prjmanager.appenderRef.stdout.ref = STDOUT
logger.authorization.name = com.dtolabs.rundeck.core.authorization
logger.authorization.level = info
logger.authorization.additivity = false
logger.authorization.appenderRef.stdout.ref = audit
logger.options.name = com.dtolabs.rundeck.remoteservice.http.options
logger.options.level = info
logger.options.additivity = false
logger.options.appenderRef.stdout.ref = options
logger.jobchanges.name = com.dtolabs.rundeck.data.jobs.changes
logger.jobchanges.level = info
logger.jobchanges.additivity = false
logger.jobchanges.appenderRef.stdout.ref = jobchanges
logger.execevents.name = org.rundeck.execution.status
logger.execevents.level = info
logger.execevents.additivity = false
ogger.execevents.appenderRef.stdout.ref = execevents
logger.apirequests.name = org.rundeck.api.requests
logger.apirequests.level = info
logger.apirequests.additivity = false
logger.apirequests.appenderRef.stdout.ref = apirequests
logger.access.name = org.rundeck.web.requests
logger.access.level = info
logger.access.additivity = false
logger.access.appenderRef.access.ref = access
logger.project.name = org.rundeck.project.events
logger.project.level = info
logger.project.additivity = false
logger.project.appenderRef.stdout.ref = project
logger.storage.name = org.rundeck.storage.events
logger.storage.level = info
logger.storage.additivity = false
logger.storage.appenderRef.storage.ref = storage
logger.webhook_events.name = org.rundeck.webhook.events
logger.webhook_events.level = info
logger.webhook_events.additivity = false
logger.webhook_events.appenderRef.webhooks.ref = webhooks
logger.webhook_plugins.name = org.rundeck.plugin.webhook
logger.webhook_plugins.level = debug
logger.webhook_plugins.additivity = false
logger.webhook_plugins.appenderRef.webhooks.ref = webhooks
logger.cleanup.name = rundeck.quartzjobs.ExecutionsCleanUp
logger.cleanup.level = debug
logger.cleanup.additivity = false
logger.cleanup.appenderRef.cleanup.ref = cleanup
logger.jetty.name = org.mortbay.log
logger.jetty.level = warn
logger.jetty.additivity = false
logger.jetty.appenderRef.stdout.ref = STDOUT
logger.hibernate.name = org.hibernate.orm.deprecation
logger.hibernate.level = error
logger.hibernate.additivity = false
logger.hibernate.appenderRef.stdout.ref = STDOUT
logger.rundeck_jaas.name = com.dtolabs.rundeck.jetty.jaas
logger.rundeck_jaas.level = debug
logger.rundeck_jaas.additivity = false
logger.rundeck_jaas.appenderRef.stdout.ref = STDOUT
logger.spring_security.name = grails.plugin.springsecurity.web.authentication.GrailsUsernamePasswordAuthenticationFilter
logger.spring_security.level = debug
logger.spring_security.additivity = false
logger.spring_security.appenderRef.stdout.ref = STDOUT
logger.jaas.name = org.rundeck.jaas
logger.jaas.level = debug
logger.jaas.additivity = false
logger.jaas.appenderRef.stdout.ref = STDOUT
logger.springBeanPropertyDescriptor.name = org.springframework.beans.GenericTypeAwarePropertyDescriptor
logger.springBeanPropertyDescriptor.level = error
logger.springBeanPropertyDescriptor.additivity = false
logger.springBeanPropertyDescriptor.appenderRef.stdout.ref = STDOUT
I'm using TYPO3 7.6 and I'd like to send an email with a Hyperlink to my TYPO3-Website (page=123). On this page I've listed all fe_users with the following TypoScript, but I'll only show one specific user, f.e. uid=20.
I have two questions:
How can I show only this user (uid) on my page?
How do I call my hyperlink?
Show all users:
lib.feUserLink = CONTENT
lib.feUserLink {
table = fe_users
select.pidInList = 10
select.max = 10
select.orderBy = last_name DESC
where = disable = 0
renderObj = COA
renderObj {
10 = TEXT
10.field = first_name
10.wrap = wq<p><strong>|
...
14 = TEXT
14.field = email
14.wrap = |</p>
}
}
-> 1. Then I have to edit my WHEREclause, but i dont't know how? All of my tests won't work.
lib.feUserLink = CONTENT
lib.feUserLink {
table = fe_users
...
andWhere.dataWrap = uid={GP:fe_users|uid}
#andWhere.data = GP:feuseruid
#andWhere.data = GP:fe_user|uid
#andWhere.intval = 1
#andWhere.wrap = uid=|
...
-> 2. And how can I show only the User from the GET-Parameter?
http://my.domain.tld/index.php?id=123&uid=20
http://my.domain.tld/index.php?id=123&feuser=20
http://my.domain.tld/index.php?id=123&fe_users[uid]=20
...
I hope someone can give me a crucial tip ...
... thank you.
Regards
Stefan
my solution was
lib.feuserLink = CONTENT
lib.feUserLink {
table = fe_users
select {
pidInList = 10
orderBy = last_name DESC
where = uid = ###field_uid###
markers.field_uid.data = GP:user
markers.field_uid.intval = 1
max = 1
}
...
Thanks for helping ...
2) Build link to page 123 with uid parameter from fe_user. Adds something like
?id=123&user=456&cHash=789
lib.feUserLink = CONTENT
lib.feUserLink {
table = fe_users
select {
pidInList = 10
max = 10
orderBy = last_name DESC
}
renderObj = COA
renderObj {
10 = TEXT
10.field = username
10.typolink {
parameter = 123
additionalParams.dataWrap = &user={field:uid}
useCacheHash = 1
}
10.wrap = |</br>
}
}
1) To show only selected user in given list, adapt your select like
[globalVar = GP:user > 0]
lib.feUserLink.select {
where = uid = ###field_uid###
markers.field_uid.data = GP:user
markers.field_uid.intval = 1
max = 1
}
[global]
You don't need clause where = disable = 0. Its already included in the SQL query by default.
My purpose for this feature is to check whether there is 2 or 3...URLs hide within 1 URL, if yes then return 1, else return 0. e.g. www.applee.com/www.samsunge.com, http://www.samsungds.http://comwww.samsung.com
I have settled the importdata prob, but now I faced difficulty for checking the data below:(I have modify the 'is_double_url.m' file, but it return me the error)
http://encuestanavemotors.com.ar/doc/newgoogledoc2013/2013gdocs/
http://totalwhiteboard.com.au/.pp/0053d4ae3e2c78154d29d413c1236341/192.186.237.145/H/
http://www.wwwwwwwwwws2.com/
http://www.paypal.com.cy.cgi.bin.webscr.cmd.login.submit.dispatch.5885d80a1faee8d48a116ba977951b3435308b8c4.turningpoint.in/f044c94b4394939f4a1a75798875f78c/
http://www.celebramania.cl/web/cc/personal/cards/5d0d5c5af4f12c319d47872fabe11262/Pool=0/?cmd=_home&dispatch=5885d80a13c0db1f8e&ee=5cd428ee24c5037dda298a4762735a94
http://joannalindsay.com/wp-content/uploads/aloo/aaleor.php?bidderblocklogin&hc=1&hm=uk%601d72f%2Bj2b2vi%3C265bidderblocklogin&hc=1&hm=uk%601d72f%2Bj2b2vi%3C265bidderblocklogin&hc=1&hm=uk%601d72f%2Bj2b2vi%3C265
http://bluedominoes.com/~kosalbco/paypal.de/
is_double_url.m file
function out = is_double_url(url_path1)
f1 = strfind(url_path1,'www.');
if isempty(f1)
out = 0;
return;
end
f2 = strfind(url_path1,'/');
f3 = bsxfun(#minus,f2,f1');
count_dots = zeros(size(f3,1),1);
for k = 1:size(f3,1)
[x,y] = find(f3(k,:)>0,1);
str2 = url_path1(f1(k):f2(y));
if ~isempty(strfind(str2,'..'))
continue
end
count_dots(k) = nnz(strfind(str2,'.'));
end
out = ~any(count_dots(2:end)<2);
if any(strfind(url_path1,'://')>f2(1))
out = true;
end
return;
f10.m file
data = importdata('url');
[sizeData b] = size(data);
for i = 1:sizeData
feature10(i) = is_double_url(data{i});
end
Code
function out = is_double_url(url_path1)
if url_path1(end)~='/'
url_path1(end+1)='/';
end
url_path1 = regexprep(url_path1,'//','//www.');
url_path1 = regexprep(url_path1,'//www.www.','//www.');
f1 = strfind(url_path1,'www.');
if numel(f1)<2
out = false;
else
f2 = strfind(url_path1,'/');
f3 = bsxfun(#minus,f2,f1');
count_dots = zeros(size(f3,1),1);
for k = 1:size(f3,1)
[~,y] = find(f3(k,:)>0,1);
str2 = url_path1(f1(k):f2(y));
if ~isempty(strfind(str2,'..'))
continue
end
count_dots(k) = nnz(strfind(str2,'.'));
end
out = ~any(count_dots(2:end)<2);
if any(strfind(url_path1,'://')>f2(1))
out = true;
end
end
return;
Runs
is_double_url('http://www.farthingalescorsetmakingsupplies.com/files/files/www.apple.com/')
is_double_url('http://www.farthingalescorsetmakingsupplies.com/files/files/www.com/')
is_double_url('http://www.farthingalescorsetmakingsupplies.com/files/files/https://www.com/')
is_double_url('http://www.farthingalescorsetmakingsupplies.com/files/files/https://www.dfdsf.my/')
Returns - 1 0 1 1 respectively.
If you have a list of URLs in a text file , use this to do checking for each of them -
fid = fopen('text2.txt'); %% 'text2.txt' has the urls on line by line basis
C = textscan(fid, '%s\n');
fclose(fid);
for k = 1:numel(C{1})
out(k) = is_double_url(C{1}{k}); %%// out stores the condition checked statuses
end
I'm trying to have a form usable for both creating a new record or updating another. Currently it is doing it through the value of a textbox (new or edit). The structure works fine, but for some reason, when it is performing the edit function, it is saving changes to the wrong record. For instance, if I am editing record 1027, when i submit it, it'll update record 1073. Its consistent, it'll always update the same, wrong record. Edit 1000, it'll update 1073; if i update 1081, it'll update 1073, and so on. Is there a way to specify which record it should be editing? yes, the record number is the primary key/id. Heres the code:
Private Sub btnSubmit_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strTable As String
Dim strField As String
Dim ID As Long
Dim newID As Long
strTable = "record_holdData"
Set db = CurrentDb
Set rs = db.OpenRecordset(strTable)
'button has 2 modes
If txtMode.Value = "NEW" Then
With rs
.AddNew
.Fields("PO_no") = txtPONum
.Fields("prodSupervisor") = cboProdSup
.Fields("qaSupervisor") = cboQASup
.Fields("labTech") = cboLabTech
.Fields("flavor") = cboFlavor
.Fields("lineNumber") = cboLineNumber
.Fields("container") = cboContainer
.Fields("package") = cboPackage
.Fields("holdQty") = txtQty
.Fields("productionDate") = txtProdDate
.Fields("dateCode") = txtDatecode
.Fields("component") = cboComponent
.Fields("nonconformance") = cboDiscrepancy
.Fields("foundDuring") = cboFoundAt
.Fields("responsibility") = cboRespCode
.Fields("comments") = txtDescription
.Fields("rootCause") = txtRootCause
.Fields("holdStatus") = 1
.Fields("dateOpened") = Now()
.Update
.Bookmark = .LastModified
newID = !ID
End With
MsgBox ("Hold information saved!")
btnPrintTag.Enabled = True
DoCmd.OpenReport "Holdtag", acViewPreview, , "[ID] = " & newID
DoCmd.Close
ElseIf txtMode.Value = "EDIT" Then
'do editing stuff
With rs
.Edit
.Fields("PO_no") = txtPONum
.Fields("prodSupervisor") = cboProdSup
.Fields("qaSupervisor") = cboQASup
.Fields("labTech") = cboLabTech
.Fields("flavor") = cboFlavor
.Fields("lineNumber") = cboLineNumber
.Fields("container") = cboContainer
.Fields("package") = cboPackage
.Fields("holdQty") = txtQty
.Fields("productionDate") = txtProdDate
.Fields("dateCode") = txtDatecode
.Fields("component") = cboComponent
.Fields("nonconformance") = cboDiscrepancy
.Fields("foundDuring") = cboFoundAt
.Fields("responsibility") = cboRespCode
.Fields("comments") = txtDescription
.Fields("rootCause") = txtRootCause
.Fields("lastEditDate") = Now()
.Update
End With
MsgBox ("Information Updated")
End If
End Sub
Sorry i caught it. Problem was I was basically redefining the recordset each time the subroutine was called. I changed the second block to the following:
ElseIf txtMode.Value = "EDIT" Then
'do editing stuff
Set rs = db.OpenRecordset("SELECT * FROM record_holdData WHERE ID=" & txtID)
With rs
.Edit
.Fields("PO_no") = txtPONum
.Fields("prodSupervisor") = cboProdSup
.Fields("qaSupervisor") = cboQASup
.Fields("labTech") = cboLabTech
.Fields("flavor") = cboFlavor
.Fields("lineNumber") = cboLineNumber
.Fields("container") = cboContainer
.Fields("package") = cboPackage
.Fields("holdQty") = txtQty
.Fields("productionDate") = txtProdDate
.Fields("dateCode") = txtDatecode
.Fields("component") = cboComponent
.Fields("nonconformance") = cboDiscrepancy
.Fields("foundDuring") = cboFoundAt
.Fields("responsibility") = cboRespCode
.Fields("comments") = txtDescription
.Fields("rootCause") = txtRootCause
.Fields("lastEditDate") = Now()
.Update
End With