When ENABLE_LIMITED_CACHE : 'true' secret-resolver doesnt work as expected

We deployed v0.6.5 and with ENABLE_LIMITED_CACHE: "false" everything is ok. When we switched to ENABLE_LIMITED_CACHE: "true" the controller only works with secret from managedNamespace, it doesnt use "sap-btp-service-operator" secrets from user namespaces.

Hi Pioter,
I was able to reproduce the issue, but I could not find any solution for retrieving secrets that don't have the required label  (services.cloud.sap.com/managed-by-sap-btp-operator: "true"), this is the kuberenetes behavior, adding this label to the secret is solving the issue - tested successfully (updating the secret with the label does not require restart of the operator).
Since these secret are created by the user and not by the btp operator we cannot migrate them to include the required label automatically, if a customer uses this feature he must update the secret he created with the label.
Currently the limited cache feature is not documented, we'll make sure to include it in the documentation.
Another solution might be to limit the allowed namespaces (ENABLE_CLUSTER_ACCESS=false), this will not require any change of the secrets but will limit the operator only for pre defined namespaces.

UPDATE
@evyaffe suggested to use uncached client as a fallback in case secret is not found in cached client
will be tested and merged if ok

I like your update last comment. If not exist in cache, use uncached client and search for secrets all existing rules.

@kerenlahav  Question, right now when ENABLE_LIMITED_CACHE: "true" which secrets do you label to be included in the cache? All from managed namespace, of just default one from managed namespace?

just the one created by helm

Hi @PK85
please check fix in https://github.com/SAP/sap-btp-service-operator/releases/tag/v0.6.6


[frontend] Workspace window is too small to display all files.

What problem or use case are you trying to solve?
The Workspace window is too small, and long file names in multi-level folders are not fully displayed

Describe the UX of the solution you'd like
Could there be a scroll bar at the bottom of the window or allow the window width to be adjusted freely? Thank you.

Thanks @lingnickTang , we should make it possible to modify the size of this window. I'd welcome help from any frontend people!

Hi @lingnickTang. This should already be implemented. Using the latest 0.8.3

Nope. Still works.

Thank you very much, I believe OpenDevin can help a lot of people.


update pre-publish steps to emit types

Related thread: https://artsy.slack.com/archives/CP9P4KR35/p1587482069305700
Updates types to emit on pre-publish

📦 Published PR as canary version: 0.2.1-canary.19.337.0

:sparkles: Test out this PR locally via:
npm install<EMAIL_ADDRESS># or
yarn add<EMAIL_ADDRESS>

:rocket: PR was released in v0.2.1 :rocket:


Write 'did-you-know' article about auditd

Using auditd is really important for security. An overview for this can be found here. I want an article that expands on the recommended actions in greater details.
Things to include:

What auditd is
How it ties into the Linux Audit System
The importance of combining this with remote logging

(Need to hook this up with NCSC/NIST references)

Ditto


Add -R flag that reruns wal on last image

I would like to suggest the addition of the -R flag that does the following:
wal -i "$(< "${HOME}/.cache/wal/wal")"

Do we really need a new launch flag for this?

I believe so. Running a bash-style command like this from i3 or polybar and getting the call to bash and all of the escaping right is cumbersome, not to mention that it breaks as soon as the location or name of the cache changes.
Having a simple flag that takes care of all of this will avoid all of these issues and should be straight forward to add.

I've added -R to pywal. (wal is no longer under active development.)
If the Python >3.6 requirement is an issue, pywal will soon support Python 3.5 (and possibly 3.4 and below if there's a desire for it.)


ioredis tries to connect to localhost when sentinels are provided

I'm trying to connect to a sentinel with:
const redisConfig = { host: '<IP_ADDRESS>', port: 31691 };
const redisClient = new Redis({
        sentinels: [ redisConfig ],
        name: "redis-cluster"
    });

The debug log of ioredis shows me that it tries to connect to localhost first, though, and I'm getting connect ECONNREFUSED <IP_ADDRESS>:6379:
{"level":"debug","message":"Chosen redis-sentinel config: { host: <IP_ADDRESS>, port: 31691 }"}
  ioredis:redis status[localhost:6379]: [empty] -> connecting +0ms
  ioredis:redis status[<IP_ADDRESS>:31691]: [empty] -> connecting +2ms
  ioredis:redis queue command[<IP_ADDRESS>:31691]: 0 -> sentinel([ 'get-master-addr-by-name', 'redis-cluster' ]) +1ms
  ioredis:redis status[<IP_ADDRESS>:31691]: connecting -> connect +91ms
  ioredis:redis status[<IP_ADDRESS>:31691]: connect -> ready +1ms
  ioredis:connection send 1 commands in offline queue +0ms
  ioredis:redis write command[<IP_ADDRESS>:31691]: 0 -> sentinel([ 'get-master-addr-by-name', 'redis-cluster' ]) +1ms
  ioredis:redis write command[<IP_ADDRESS>:31691]: 0 -> sentinel([ 'sentinels', 'redis-cluster' ]) +21ms
  ioredis:SentinelConnector Updated internal sentinels: [{"host":"<IP_ADDRESS>","port":31691}] @1 +0ms
  ioredis:SentinelConnector resolved: <IP_ADDRESS>:31084 +1ms
  ioredis:redis status[<IP_ADDRESS>:31084]: connecting -> connect +35ms
  ioredis:redis write command[<IP_ADDRESS>:31084]: 0 -> info([]) +1ms
  ioredis:redis status[<IP_ADDRESS>:31691]: ready -> close +1ms
  ioredis:connection skip reconnecting since the connection is manually closed. +59ms
  ioredis:redis status[<IP_ADDRESS>:31691]: close -> end +1ms
  ioredis:redis status[<IP_ADDRESS>:31084]: connect -> ready +20ms
  ioredis:redis status[<IP_ADDRESS>:6379]: [empty] -> connecting +6ms
  ioredis:redis queue command[<IP_ADDRESS>:6379]: 0 -> info([]) +1ms
  ioredis:connection error: Error: connect ECONNREFUSED <IP_ADDRESS>:6379
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1137:16) {
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '<IP_ADDRESS>',
  port: 6379
} +32ms

I don't think it matters (commented it out) but later on, I'm using the ioredis connection in a bull queue
new Queue("cronJobQueue", {
            createClient: redisClient
        });

I've found the following 2 related issues but mine seems to be a little different: https://github.com/luin/ioredis/issues/796, https://github.com/luin/ioredis/issues/367
My SENTINEL sentinels redis-cluster output is:
1)  1) "name"
    2) "f01bb48b8f7e272bcc016e9511c7ff068bdb1b09"
    3) "ip"
    4) "<IP_ADDRESS>"
    5) "port"
    6) "31556"
    7) "runid"
    8) "f01bb48b8f7e272bcc016e9511c7ff068bdb1b09"
    9) "flags"
   10) "s_down,sentinel,disconnected"
   11) "link-pending-commands"
   12) "2"
   13) "link-refcount"
   14) "1"
   15) "last-ping-sent"
   16) "6326210"
   17) "last-ok-ping-reply"
   18) "6326834"
   19) "last-ping-reply"
   20) "6326834"
   21) "s-down-time"
   22) "6324616"
   23) "down-after-milliseconds"
   24) "1500"
   25) "last-hello-message"
   26) "6326795"
   27) "voted-leader"
   28) "?"
   29) "voted-leader-epoch"
   30) "1"
2)  1) "name"
    2) "8255b32b11d92e6bfa18e3312611610d3fd126b5"
    3) "ip"
    4) "<IP_ADDRESS>"
    5) "port"
    6) "31947"
    7) "runid"
    8) "8255b32b11d92e6bfa18e3312611610d3fd126b5"
    9) "flags"
   10) "s_down,sentinel,disconnected"
   11) "link-pending-commands"
   12) "2"
   13) "link-refcount"
   14) "1"
   15) "last-ping-sent"
   16) "6326210"
   17) "last-ok-ping-reply"
   18) "6326834"
   19) "last-ping-reply"
   20) "6326834"
   21) "s-down-time"
   22) "6324616"
   23) "down-after-milliseconds"
   24) "1500"
   25) "last-hello-message"
   26) "6326646"
   27) "voted-leader"
   28) "?"
   29) "voted-leader-epoch"
   30) "1"

And this is my get-master-addr-by-name output:
<IP_ADDRESS>:31691> SENTINEL get-master-addr-by-name redis-cluster
1) "<IP_ADDRESS>"
2) "31084"

Any help will be much appreciated!

I have the same problem, first two time - redis trying connect to <IP_ADDRESS>:6379
and got error
You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection: Error: connect ECONNREFUSED <IP_ADDRESS>:6379     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1128:14)
but third try connect - ioredis set correct url what i set in config.

This is happening to us as well. It seems ioredis is making the assumption that a redis server exists on localhost, when that is not the case and sentinel connection strings are being provided.

@lukeescude any news? Having the same problem and it's super annoying...


⚠ BCR Bot has degraded performance

In afffb98, BCR Bot (https://bcr.alternativasinteligentes.com/BCRApi/web/chatbot) experienced degraded performance:

HTTP code: 200
Response time: 8571 ms

Resolved: BCR Bot performance has improved in 8262dbe.


Backport #6032 (required recipe) to Chef 12

Description
Backport #6032 -- we want folks to be able to use this without upgrading to 13.
Issues Resolved
n/a
Check List

[x] New functionality includes tests
[x] All tests pass
[x] RELEASE_NOTES.md, has been updated if required (not required for bugfixes, required for API changes)
[x] All commits have been signed-off for the Developer Certificate of Origin. See https://github.com/chef/chef/blob/master/CONTRIBUTING.md#developer-certification-of-origin-dco

Now also backports #6042

I think we're planning to put this feature in the release notes of Chef Server when that ships, would just be confusing now since the Chef Server change isn't yet in CURRENT.


(PDB-1255) Switch tests to pick open port before bootstrapping TK

Previously tests would set Jetty's port to 0, which automatically picks
an open port on startup. The downside of that was the PuppetDB config
wouldn't be updated with the actual port chosen, so that info would have
to be pulled from the Jetty server. This patch switches to determine an
open port before starting TK, then use that port in the TK config. This
makes our test more like what users would run (specifying a port rather
than letting Jetty choose).

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/763/

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/771/

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/790/

@mullr @kbarber @rbrw Pushed up some logic to catch problems with binding to the random port and retrying

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/798/

@rbrw Switched to decrement instead of increment

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/814/

@pljenkinsro retest this please

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/822/

@pljenkinsro retest this please


Standard library includes trigger fail for .h files

cpp-linter seems to treat .h files as exclusively C files, and won't find standard libraries.
The same isn't true if the file is *.hpp.
Not sure if this is a bug, or feature. I'm going to say bug for now since exercism requires bob.h.

This linter has been completely re-written since this was filed, and it looks like the original post wasn't actually for this particular plugin anyway. Marking as closed.


Horizontal scrollbar not showing in datatable

TuSimple/naive-ui version (版本)
2.29.1
Vue version (Vue 版本)
3.2.36
Browser and its version (浏览器及其版本)
Chrome (102.0.5005.63)
System and its version (系统及其版本)
Windows 11 (10.0.22000 Build 22000)
Node version (Node 版本)
16.14.0
Reappearance link (重现链接)
https://www.naiveui.com/en-US/os-theme/components/data-table#fixed-header-column.vue
Reappearance steps (重现步骤)
from the demo in the documentation it doesn't work anymore
Expected results (期望的结果)
Previously, the horizontal scrollbar appeared
Actual results (实际的结果)
After I updated the version to 2.29.1
Remarks (补充说明)

I met the same problem


[DDW-1213] Upgrade Electron to 24.2, and Node.js to 18.×

This PR updates Electron and Node.js.
Direct trigger was our need for the node:crypto built-in module, which was not available in Node.js 14.×, but it's good to update either way.
Also: all Windows blobs are now cross-built from source (still with Visual Studio).
Todos

[x] Linux
[x] macOS on Intel
[x] macOS on Apple Silicon
[x] Windows
[x] Linux devshell
[x] macOS devshell

Screenshots
n/a
Testing Checklist

Slack QA thread
[ ] Please, test hardware wallets
[ ] And also that opening external links still behaves as expected

Test Report: Link

Review Checklist
Basics

[x] PR assigned to the PR author(s)
[x] input-output-hk/daedalus-dev and input-output-hk/daedalus-qa assigned as PR reviewers
[x] If there are UI changes, Alexander Rukin assigned as an additional reviewer
[ ] All visual regression testing has been reviewed (assign run Chromatic label to PR to trigger the run)
[x] PR has appropriate labels (release-vNext, feature/bug/chore, WIP)
[x] PR link is added to a Jira ticket, ticket moved to In Review
[x] PR is updated to the most recent version of the target branch (and there are no conflicts)
[x] PR has a good description that summarizes all changes
[x] PR contains screenshots (in case of UI changes)
[x] CHANGELOG entry has been added to the top of the appropriate section (Features, Fixes, Chores) and is linked to the correct PR on GitHub
[x] There are no missing translations (running yarn manage:translations produces no changes)
[x] Text changes are proofread and approved (Jane Wild / Amy Reeve)
[x] Japanese text changes are proofread and approved (Junko Oda)
[ ] Storybook works and no stories are broken (yarn storybook)
[x] In case of dependency changes yarn.lock file is updated

Code Quality

[x] Important parts of the code are properly commented and documented
[x] Code is properly typed with typescript types
[x] React components are split-up enough to avoid unnecessary re-renderings
[x] Any code that only works in main process is neatly separated from components

Testing

[ ] New feature/change is covered by acceptance tests
[ ] New feature/change is manually tested and approved by QA team
[ ] All existing acceptance tests are still up-to-date
[ ] New feature/change is covered by Daedalus Testing scenario
[ ] All existing Daedalus Testing scenarios are still up-to-date

After Review

[ ] Update Slack QA thread by marking it with a green checkmark

@gabriela-ponce could you check once more? 🙏  Now it should work (I checked on all platforms)


Continue poking ARS to remove all direct references to CAM

I filed a ticket to do this at https://github.com/RTXteam/RTX/issues/2050, but we still show up on e.g. https://arax.ncats.io/devLM/index.html?systest=1
We should make sure that they remove all references to the CAM-KP endpoint so they are correctly picking up our data from Automat-CAM-KP instead.

This appears to be resolved now. Closing.


Wrong id vs objectId in retrieve command

Example command:
az ad user show --id<EMAIL_ADDRESS>--query id--output tsv

Does not retrieve anything. After retry az ad user show --id<EMAIL_ADDRESS>I found that id was changed to objectId
Correct example command should be:
az ad user show --id<EMAIL_ADDRESS>--query objectId --output tsv

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 8788e944-1b89-9f78-4c7c-409092e073e5
Version Independent ID: 7484bf47-59da-5eaf-17c3-ccaecf45f185
Content: Assign Azure roles using Azure Resource Manager templates - Azure RBAC
Content Source: articles/role-based-access-control/role-assignments-template.md
Service: role-based-access-control
GitHub Login: @rolyon
Microsoft Alias: rolyon

@Mishco
Thanks for your feedback! We will investigate and update as appropriate.

@Mishco
Thank you for pointing this out.  We have created a PR for this issue and the changes should go live soon.

#closed


CentOS 7 build environment

Hi @mikeowens,
This is a patch to add support for CentOS in the CMake system, and add a Docker environment in order to have a repeatable build.
I haven't tested the build on a Debian system to check for regression bugs, but I didn't change those files anyway.
I'll also follow up later with another PR.  I'm working on a project to port an authentication system using the old mod_ruby into CentOS 7.  I need to add a check_access handler, as the regular content handlers are too intrusive on the rest of the Apache stack.

I am reviewing now.
One issue I see right off is the last commit (c56bdd8): the rhtml.yy.cpp is automatically generated by flex on initial cmake configuration. This is in line 6 or src/CMakeLists.txt. It should not be removed in the rhtml_lib target. If that file is not showing up then flex is not generating the file for some reason -- either flex is not on the system or the execute_process() is not being called.
I will try to test the rest tomorrow to hopefully merge the changes.

Thanks!  Yeah that was my mistake -- I reverted c56bdd8 later on and added flex to the Dockerfile when I discovered that.


[WFLY-4831] Clean up HornetQ modules

Linux with security manager Build 1691 is now running using a merge of 5946a86b197d507ffa3c20aa1d654227dd90aad1

Linux Build 6793 is now running using a merge of 5946a86b197d507ffa3c20aa1d654227dd90aad1

Windows Build 1868 is now running using a merge of 5946a86b197d507ffa3c20aa1d654227dd90aad1

Please, do not merge until someone working on the transactions subsystem (@mmusgrov ?) agreed with the change to the org.jboss.jts  module. AFAIK, its dependency to org.hornetq module was only for its journal code (now provided by the org.hornetq.journal module).

Linux with security manager Build 1691 outcome was SUCCESS using a merge of 5946a86b197d507ffa3c20aa1d654227dd90aad1
Summary: Tests passed: 852, ignored: 322 Build time: 0:05:53

Windows Build 1868 outcome was SUCCESS using a merge of 5946a86b197d507ffa3c20aa1d654227dd90aad1
Summary: Tests passed: 2871, ignored: 393 Build time: 0:45:28

Linux Build 6793 outcome was FAILURE using a merge of 5946a86b197d507ffa3c20aa1d654227dd90aad1
Summary: Tests failed: 2 (2 new), passed: 2867, ignored: 393, muted: 2 Build time: 0:47:53
Build problems:
Failed tests detected
Failed tests
org.jboss.as.test.integration.ws.wsse.signencrypt.EJBSignEncryptTestCase.encryptedAndSignedRequest: <no details avaliable>

org.jboss.as.test.clustering.cluster.web.authentication.FormAuthenticationWebFailoverTestCase(SYNC-tcp).test: <no details avaliable>

retest this please

Linux Build 6798 is now running using a merge of 5946a86b197d507ffa3c20aa1d654227dd90aad1

Linux with security manager Build 1696 is now running using a merge of 5946a86b197d507ffa3c20aa1d654227dd90aad1

Windows Build 1873 is now running using a merge of 5946a86b197d507ffa3c20aa1d654227dd90aad1

Linux with security manager Build 1696 outcome was SUCCESS using a merge of 5946a86b197d507ffa3c20aa1d654227dd90aad1
Summary: Tests passed: 852, ignored: 322 Build time: 0:06:10

Linux Build 6798 outcome was FAILURE using a merge of 5946a86b197d507ffa3c20aa1d654227dd90aad1
Summary: Tests failed: 1 (1 new), passed: 2870, ignored: 393 Build time: 0:46:32
Build problems:
Failed tests detected
Failed tests
org.jboss.as.test.clustering.cluster.sso.ClusteredSingleSignOnTestCase(SYNC-tcp).testNoAuthSingleSignOn: <no details avaliable>

Windows Build 1873 outcome was SUCCESS using a merge of 5946a86b197d507ffa3c20aa1d654227dd90aad1
Summary: Tests passed: 2871, ignored: 393 Build time: 0:47:41

Windows Build 1877 is now running using a merge of 774d512ea5636238df34fb8b980c4b98d5d75718

Linux with security manager Build 1700 is now running using a merge of 774d512ea5636238df34fb8b980c4b98d5d75718

Linux Build 6802 is now running using a merge of 774d512ea5636238df34fb8b980c4b98d5d75718

Linux with security manager Build 1700 outcome was SUCCESS using a merge of 774d512ea5636238df34fb8b980c4b98d5d75718
Summary: Tests passed: 853, ignored: 321 Build time: 0:05:58

Linux Build 6802 outcome was FAILURE using a merge of 774d512ea5636238df34fb8b980c4b98d5d75718
Summary: Tests failed: 2 (2 new), passed: 2884, ignored: 378 Build time: 0:45:08
Build problems:
Failed tests detected
Failed tests
org.jboss.as.test.integration.messaging.mgmt.ConnectionFactoryManagementTestCase.testWriteDiscoveryGroupAttributeWhenConnectorIsAlreadyDefined: <no details avaliable>

org.jboss.as.test.clustering.cluster.web.authentication.FormAuthenticationWebFailoverTestCase(SYNC-tcp).test: <no details avaliable>

Windows Build 1877 outcome was SUCCESS using a merge of 774d512ea5636238df34fb8b980c4b98d5d75718
Summary: Tests passed: 2886, ignored: 378 Build time: 0:48:22

@mmusgrov what do you think?

@jmesnil @n1hility  Jeff you are correct, we only ever depended on the journal component so the change you have made to depend on org.hornetq.journal module instead is good. Thank you.

retest this please

Windows Build 1884 is now running using a merge of 774d512ea5636238df34fb8b980c4b98d5d75718

Linux Build 6809 is now running using a merge of 774d512ea5636238df34fb8b980c4b98d5d75718

Linux with security manager Build 1707 is now running using a merge of 774d512ea5636238df34fb8b980c4b98d5d75718

Linux with security manager Build 1707 outcome was SUCCESS using a merge of 774d512ea5636238df34fb8b980c4b98d5d75718
Summary: Tests passed: 855, ignored: 321 Build time: 0:06:03

Linux Build 6809 outcome was SUCCESS using a merge of 774d512ea5636238df34fb8b980c4b98d5d75718
Summary: Tests passed: 2888, ignored: 377, muted: 1 Build time: 0:45:22

Windows Build 1884 outcome was SUCCESS using a merge of 774d512ea5636238df34fb8b980c4b98d5d75718
Summary: Tests passed: 2889, ignored: 377 Build time: 0:46:27


Fix tests

what

update vpc version in examples

why

tests currently fail with the latest AWS provider

references

None

/terratest


No relation between cms_pages and CatalogListView

The cms_pages many-to-many relation in the commodity is not influencing the CatalogListView. Regardless of the relation made in the admin interface, every commodity shows on every cms_page.

You must either use the CMSPageCatalogWrapper or apply the filter CMSPagesFilterBackend on the CatalogListView. This filter does the job.

Thanx, using CMSPageCatalogWrapper in i18n_commodities.py did the job.

It seems, i faced with same issue. Could you help me to solve it? I don't understand, how to use this wrapper @gntjou @jrief

Oh, i got it. CMSPageCatalogWrapper  uses instead of ProductListView and CatalogSearchSerializer instead of ProductSummarySerializer lucky i found this issue.


add pandas to scientific computing tools?

Hm, I wouldn't since we don't use it in the current notebooks?

ok


Issues with Reset-SnipeitAccessoryOwner

Context
When using the API, I am trying to reset the owner to no one and I get an error
Reset-SnipeitAccessoryOwner -assigned_pivot_id $Item.pivotid
Invoke-SnipeitMethod : Cannot validate argument on parameter 'Body'. The argument is null, empty, or an element of the argument collection contains a null value. Supply a collection that does not contain any null values and then try the command again.
At C:\Program Files\WindowsPowerShell\Modules\SnipeitPS\1.9.176\Public\Reset-SnipeitAccessoryOwner.ps1:55 char:40
+         $result = Invoke-SnipeitMethod @Parameters
+                                        ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Invoke-SnipeitMethod], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Invoke-SnipeitMethod

Your Environment

SnipeitPS Module version used: 1.9.176
Operating System and PowerShell version: Windows 10, PS 5.1
Snipe It version:5.1.8 - build 6227

Expected Behavior
With Assets, it resets and everything works fine
Current Behavior
I get the error
Possible Solution
I think the body being "@{}", it doesn't like it
Steps to Reproduce (for bugs)

Reset-SnipeITAccessoryOwner -assigned_pivot_id 51

Thanks for this.  Two strict parameter check was causing this. Fixed in develop, and published quite soon. :)


Aria-Expanded is Missing from Accordion

Detailed description
Hello, I am a screen reader user and was looking at the code examples and the accordions do not properly handle the aria-expanded attribute. Also, it's good practice to have accordions be button elements. Currently they are delineated as tabs which is really confusing because tabs and accordions are different. Tabs show information below the tab list and can be navigated and selected using the arrow keys. Accordions use the expanded and collapsed attribute and the content is inserted below the expanded element.
For a very good example of accordions, see this example from AccDC
Steps to reproduce the issue

Using NVDA on Chrome Version 71.0.3578.80 (Official Build) (64-bit) visit the accordion example
hit enter on the first: "Expand/Collapse Section 1 title"

What Happened
nothing. NVDA says nothing when enter is pressed on the top collapsible component.
What Should Happen
NVDA should say "Expanded" and the next press of enter NVDA should announce "collapsed" (Although for some reason enter doesn't seem to collapse the component, it's probably because it's not a button and is not getting the key press).

hi @frastlin thanks for reporting this issue! I've pushed a quick fix to add aria-expanded to the accordion here, but I am still in the process of setting up NVDA on my machine. Can you confirm whether or not the component is improved at this staging link?
You also brought up a good point about our usage of the tab role right now, and while the pull request I referenced doesn't address it yet, it is also something I would like to explore further. But first I want to make sure that the component is detectable by screen readers after this change

No, the example does not work as expected.
The existing element looks like:
<button type="button" class="bx--accordion__heading" role="tab"><svg class="bx--accordion__arrow" fill-rule="evenodd" height="12" role="img" viewBox="0 0 7 12" width="7" aria-label="Expand/Collapse" alt="Expand/Collapse"><title>Expand/Collapse</title><path d="M5.569 5.994L0 .726.687 0l6.336 5.994-6.335 6.002L0 11.27z"></path></svg>
Section 1 title
</button>

And should look like:
<button type="button" class="bx--accordion__heading" aria-expanded="false"><svg class="bx--accordion__arrow" fill-rule="evenodd" height="12" role="img" viewBox="0 0 7 12" width="7" alt="Expand/Collapse"><title>Expand/Collapse</title><path d="M5.569 5.994L0 .726.687 0l6.336 5.994-6.335 6.002L0 11.27z"></path></svg>
Section 1 title
</button>

Note the removal of the role="tab" (It is not proper aria to make that button into a tab when a button is what it should be), and the addition of the aria-expanded="false" element. In the react code, the onClick function should change a Boolean state that says "expanded" and that should be in the aria-expanded.
Aria-expanded={this.state.expanded}

Also, I don't think the aria-labeled in the svg does anything.

Question:
Is the:
<svg class="bx--accordion__arrow" fill-rule="evenodd" height="12" role="img" viewBox="0 0 7 12" width="7" aria-label="Expand/Collapse" alt="Expand/Collapse">

an arrow saying if the element can be expanded or collapsed? If so, it should be:
<svg class="bx--accordion__arrow" fill-rule="evenodd" height="12" viewBox="0 0 7 12" width="7" aria-hidden="true">

From this guide on tabs

Since state is communicated via the aria-expanded attribute non-visually, we don't need this graphic to be screen reader accessible or interactive.

Also, Accordion.js does not need:
role="tablist"
aria-multiselectable="true"

We don't need the tablist because this is an accordion, not a tab. We don't need the second one because we can't actually "select" the accordion element, instead we "expand" the element which is all performed with the aria-expanded attribute.

hi @frastlin thank you for the feedback! It seems like some of my changes are in line with what you are suggesting, although I incorrectly placed them on the element that wraps the <button> instead of the <button> itself. The changes we can make to the markup in this repository are dictated by what we do in the vanilla component repository. Is this issue also present in our vanilla accordion implementation? If so then I can make the necessary fixes to both repositories

hi @frastlin thank you for the feedback! It seems like some of my changes were in line with what you are suggesting, although I incorrectly placed them on the element that wraps the  instead of the  itself. I've now made that correction, so would you be able to take another look at the staging link?
Regarding your suggestions: I can definitely add the attributes you suggested and remove the linked attributes from Accordion.js and the role attribute from the <AccordionItem> SVG icons. But can I get some more clarification on removing our existing aria-label and alt aria-attributes from the <AccordionItem> SVG icons?

No, the Vanilla component looks perfect.
What is the point of the svg? Why does it exist? If the answer is to tell the user that this is an expandable component and tell the state of the expanded component, then the aria-expanded attribute already does this.
Here is what NVDA says on aria-expanded="false" in the vanilla example:
"Button collapsed Section 1 title"
With aria-expanded="true" NVDA says:
"Button expanded Section 1 title"
Screen reader users know that button collapsed means the element is something they can hit enter or space on (enter and space both trigger the onClick event), and because the button with aria-expanded is such a common feature, hearing "expanded" or "collapsed" lets us know the state and that we can change the state. Also, the aria-expanded attribute has NVDA announce "Expanded" or "collapsed" when the state changes.
Adding the svg just confuses what is going on. Here is what NVDA would say if that svg had the alt description, img role and was not hidden:
"Button collapsed graphic Expand/Collapse Section 1 title"
"Button expanded graphic Expand/Collapse Section 1 title"
In contrast, hiding the svg would be:
"Button collapsed Section 1 title"
The first option has lots of extra information and the second one has just the information we need. In UX, this second option follows two heuristics:

Consistency and standards: button combined with aria-expanded is an accordion to screen reader users.
Aesthetic and minimalist design: The "graphic Expand/Collapse" distracts from the important information of element, state, title.

(Also if aria-hidden="true" is on any element, it is hidden from the screen reader, so those extra accessibility elements are just taking up space)
The latest fix looks great thank you!

thank you for the clarification @frastlin ! yes I deleted and reposted my response once I realized what the issue was. glad to hear that the latest fix has improved things!


Creating a multi-picture layout

Hello! Thanks for the package, it looks very interesting!
I would like to try creating travel photo-books with it and I would like to define some multi-image layouts to be used in selected pages. What I mean with it is that, for example, I would like a page to contain four images arranged in a grid, possibly with different sizes. I have started developing the simple command \Collage{outer-margin}{image-spacing}{image-1}{image-2}{image-3}{image-4}, which can produce something like this:

The white rectangle represents the page produced by LaTeX, while the grey frame is just needed to see the borders of the page.
I managed to build the command, but I am a bit uncertain of the way I did it. I had to create a page and insert 4 cells using "absolute positioning". The width of each image should be (page_width - bleed - 2* outer_margin - image_spacing) / 2, while the the height (page_height - 2*bleed - 2* outer_margin - image_spacing) / 2. The origin of the top-left image should be (outer_margin, bleed+outer_margin), and for the others I just need to shift one or both origins by image_spacing+image_width or image_spacing+image_height.
My doubts are:

To obtain the width of the page, I tried using \paperwidth but it is larger than what I expected. Instead, it looks like the proper dimension is \blockwidth. Is this correct?
When I calculate the origin of the first picture, it looks like there is "something" missing in my calculations. After experimenting a bit, I think that my conclusion is that the origin has to be offset by \bleed, both horizontally and vertically. I thought the coordinate system started on the top-left corner, but it looks like we need to offset it by this amount. Is my understanding correct?
I guess in general it's not clear to me what are the dimensions to use in general, and what they signify. As an example, why is paperwidth larger than the pdf size, what is imageblockwidth used for, etc. I know there's info in the documentation, but I thought I understood them until I saw the results...

Here is a minimal (more or less) working example. To compile it, you just need to have an image named test in the same folder. I used Lenna's picture, it seemed appropriate!
\documentclass[%
	layoutmode=block,
	blockwidth=20cm,
	blockheight=20cm,
	imageblockwidth=1.0,
	imageblockheight=1.0,
	bleed=10mm,
	final
]{photobook}

% Remove page numbering
\usepackage{nopageno}

% A font I like
\usepackage{palatino}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The following should eventually be moved into a package

% Dependencies
\usepackage{tikz}
\usepackage{pgfmath}
\usepackage[strict]{changepage}
\usepackage{ifdraft}

% Helper command to convert a value from points to the given unit.
\makeatletter
\def\convertto#1#2{\strip@pt\dimexpr #2*65536/\number\dimexpr 1#1}
\makeatother

% Print the given length, in cm.
\newcommand{\printcm}[1]{\convertto{cm}{\the#1}cm}

% Create a white box that shows the size (in cm) of the cell it box belongs to.
% This is meant for debugging purposes.
\newcommand{\cellsizebox}{\begin{tikzpicture}\node[draw,minimum width=\cellwidth,minimum height=\cellheight] at (0,0) {\shortstack{W: \printcm{\cellwidth}\\ H: \printcm{\cellheight}}};\end{tikzpicture}}

% Some lengths that I need inside the main macro.
\newlength{\CollageOffset}
\setlength{\CollageOffset}{\bleed}
\newlength{\CollageOuterMargin}
\newlength{\CollageImageSpacing}
\newlength{\CollageFirstWidth}
\newlength{\CollageSecondWidth}
\newlength{\CollageFirstHeight}
\newlength{\CollageSecondHeight}

% Main command: create a collage with four pictures of variable size.
% Usage:
%   \CollageTwo{outer_margin}{outer_margin}{width_ratio}{height_ratio}{img1}{img2}{img3}{img4}
%
% Creates a collage with four pictures like this one:
%
%   =-----------------------------------+
%   = . . . . . . . . . . . . . . . . . |
%   =                                 . |
%   =                                 . |
%   =    +------+   +------------+    . |
%   =    | img1 |   |    img2    |    . |
%   =    +------+   +------------+    . |
%   =                                 . |
%   =    +------+   +------------+    . |
%   =    |      |   |            |    . |
%   =    | img3 |   |    img4    |    . |
%   =    |      |   |            |    . |
%   =    +------+   +------------+    . |
%   =                                 . |
%   =                                 . |
%   = . . . . . . . . . . . . . . . . . |
%   =-----------------------------------+
%
% In the image above, the outer frame represents the visible page in the
% produced pdf. The dotted frame is obtained by "shrinking" the page size by
% "\bleed" from all sides, except the gutter. The dotted frame is then shurk,
% this time in all four directions, by a margin equal to "outer_margin". The
% distance between all images is determined by outer_margin. Finally, the size
% of each image is calculated as follows. The remaining horizontal and vertical
% space for the images  are respectively:
%   W = page_width - bleed - 2*outer_margin - image_spacing
%   H = page_width - 2*bleed - 2*outer_margin - image_spacing
% The sizes of the images are then calculated as:
%   img1:     width_ratio*W ;     height_ratio*H
%   img2: (1-width_ratio)*W ; (1-height_ratio)*H
%   img3:     width_ratio*W ;     height_ratio*H
%   img4: (1-width_ratio)*W ; (1-height_ratio)*H
%
% TODO: allow to set the image fill-type (fit, fill, etc?)
% TODO: key-value pairs with defaults (at least for the ratios!)
% TODO: change name!
\newcommand{\CollageTwo}[8]{%
	\begin{page}%
		% Give a name to the first two parameters of the macro.
		\setlength{\CollageOuterMargin}{#1}%
		\setlength{\CollageImageSpacing}{#2}%
		%
		% Calculate the size of each image using pgfmath.
		\pgfmathparse{(\blockwidth - \bleed - 2\CollageOuterMargin - \CollageImageSpacing) * #3}%
		\setlength{\CollageFirstWidth}{\pgfmathresult pt}%
		\pgfmathparse{(\blockwidth - \bleed - 2\CollageOuterMargin - \CollageImageSpacing) * (1-#3)}%
		\setlength{\CollageSecondWidth}{\pgfmathresult pt}%
		\pgfmathparse{(\blockheight - 2\bleed - 2\CollageOuterMargin - \CollageImageSpacing) * (#4)}%
		\setlength{\CollageFirstHeight}{\pgfmathresult pt}%
		\pgfmathparse{(\blockheight - 2\bleed - 2\CollageOuterMargin - \CollageImageSpacing) * (1-#4)}%
		\setlength{\CollageSecondHeight}{\pgfmathresult pt}%
		%
		% Calculate the coordinates of the origins. Make sure to properly handle
		% even and odd pages.
		\checkoddpage%
		\def\collageX{\ifoddpage\else\bleed+\fi \CollageOffset+\CollageOuterMargin}%
		\def\collageY{\CollageOffset+\bleed+\CollageOuterMargin}%
		\def\collageXX{\collageX+\CollageFirstWidth+\CollageImageSpacing}%
		\def\collageYY{\collageY+\CollageFirstHeight+\CollageImageSpacing}%
		%
		% Place the images if in final mode, or a box with the content size in
		% cm, if in draft mode.
		\begin{cell}{\collageX,\collageY}{\CollageFirstWidth}{\CollageFirstHeight}%
			\ifdraft{\cellsizebox}{\imagecell[fill]{}{#5}}%
		\end{cell}%
		%
		\begin{cell}{\collageXX, \collageY}{\CollageSecondWidth}{\CollageFirstHeight}%
			\ifdraft{\cellsizebox}{\imagecell[fill]{}{#6}}%
		\end{cell}%
		%
		\begin{cell}{\collageX, \collageYY}{\CollageFirstWidth}{\CollageSecondHeight}%
			\ifdraft{\cellsizebox}{\imagecell[fill]{}{#7}}%
		\end{cell}%
		%
		\begin{cell}{\collageXX, \collageYY}{\CollageSecondWidth}{\CollageSecondHeight}%
			\ifdraft{\cellsizebox}{\imagecell[fill]{}{#8}}%
		\end{cell}%
	\end{page}%
}

% TODO: once the "CollageTwo" macro accepts the defaults for the ratio, remove this macro!
\newcommand{\Collage}[6]{\CollageTwo{#1}{#2}{0.5}{0.5}{#3}{#4}{#5}{#6}}

% Book information
\def\BookTitle{Foobar}
\def\BookAuthors{Franco Fusco}
\def\ThanksTo{Flynx}
\def\Edition{N/A}

\begin{document}

	% Author and copyright information.
	\BookInfoPage

	% "Square" aspect ratio
	\Collage{0cm}{0cm}{test}{test}{test}{test}
	\Collage{0cm}{0.5cm}{test}{test}{test}{test}
	\Collage{1cm}{0cm}{test}{test}{test}{test}
	\Collage{1cm}{0.5cm}{test}{test}{test}{test}

	% Non-square aspect ratio
	\CollageTwo{0cm}{0cm}{0.6}{0.6}{test}{test}{test}{test}
	\CollageTwo{0cm}{0.5cm}{0.6}{0.6}{test}{test}{test}{test}
	\CollageTwo{1cm}{0cm}{0.6}{0.6}{test}{test}{test}{test}
	\CollageTwo{1cm}{0.5cm}{0.6}{0.6}{test}{test}{test}{test}

	% Full bleed
	\CollageTwo{-\bleed}{0cm}{0.6}{0.6}{test}{test}{test}{test}
	\CollageTwo{-\bleed}{0.5cm}{0.6}{0.6}{test}{test}{test}{test}
\end{document}

Hi,
Seems that you have already figured out most of it.
I'll try and fill in the blanks:

All sizes in LaTeX are indeed relative to the "page",
LaTeX has no concept of bleeds (i.e. bleeds are non-existent / 0pt),
geometry's \paperwidth / \paperheight are the size of the paper, how LaTeX sees it (with bleeds), before it is cut to size, while photobook's \blockwidth / \blockheight are the size of the final block in the finished book, i.e. without the bleeds an binding offset but including the gutter offset (see: "Page geometry" in the docs (updated the docs to reflect this better),
\bindingoffset sets the "bleed" in the gutter (love how this sounds out of context ;) ) of the page -- it is separate form \bleed as it can be handled/set a bit differently from the normal bleeds depending on the bind type,
photobook sets the bleeds within the LaTeX's page so as not to break any packages that align relative to the page and might need to be printed full bleed, and to avoid any trimming of content outside the "page" that may occur,
In PDF, bleeds are implemented as boxes and are used by the printer to align the paper for printing, binding, to "cut off" the bleeds after binding the block, and by pdf viewers and editors to show you the final page as it would be seen in paper form (see pdf's /MediaBox, /BleedBox, /ArtBox, /TrimBox, and /CropBox and photobook's \pdfboxesset[..]{..}{..} command, though this is mostly for reference and for the very uncommon case where you would want to do something really low-level / exotic as photobook takes care of this internally).
To make things simpler photobook defines the papercell env to position cells relative to the final page -- the naming might be a bit confusing if you add the geometry package into the mix, but within photobook it is needed to differentiate the physical page (paper) and the logical pages, for example: a single foldout "page" can include multiple logical pages, while a simple page in the general case is both a physical page and a logical page. See: "Paper cells" vs. "Page cells" in the docs (might need to rethink naming again).

Looking at how you organized your code, if you are aiming for a generic command, usable in different projects, I'd suggest a less absolute approach if possible, here's a basic example:
https://github.com/flynx/photobook/blob/main/examples/two-image-page.tex
Also, do not forget that \bindingoffset is used instead of \bleed in the gutter so you'll have to also make your command page-position-aware if you are positioning things absolutely.
And in the general case you should also account for \gutteroffset to make things more compatible with photobook macros/commands/envs -- it is used to shift page content relative to the page gutter to account for different binding types.
IMHO, it would be far simpler to actually position your content relative to the containing cell, this way you can use any of the existing cells as containers to place your "element" in any way you want (including recursively), be it full bleed or with the same geometry as a text block, for example... and implement your page templates on top of that. This way photobook will take care of all the details like bleeds and page offsets so you can forget they ever existed (see the available container cells defined by photobook) ...I was planning on implementing a grid cell but was procrastinating, putting it off till the next book project, but I was thinking of a more generic approach, though that would be quite a bit more tedious than what you are doing =)
Cheers)

Ok, I think that now I understand my... misunderstanding! Basically, the bleed is invisible in the pdf viewer, but it is there. The red rectangle in the picture I attached is actually the visible page already. And the margin I have added in the internal part should be "manually" offset by the gutter and binding offset as needed - since I am using "absolute positioning".
So to make it clear (at least to me) the snippet
\begin{page}
  \begin{cell}{0pt, 0pt}{\paperwidth}{\paperheight}
    \imagecell{}{img.jpg}
  \end{cell}
\end{page}

creates a "full page image" that is "good" for printing and cutting. If I used just  \begin{cell}{\bleed, \bleed}{\blockwidth}{\blockheight} the pdf would have been ok but printing is troublesome - because I am not bleeding.

That said, I still have a couple of questions. I'll post them in separate comments to make them more digestible.
First of all, you suggested to use inline cells. However, I am having issues. I tried to write the following:
\documentclass[%
  layoutmode=block,
  blockwidth=22cm,
  blockheight=20cm,
  imageblockwidth=1.0,
  imageblockheight=1.0,
  bindingoffset=1cm,
  gutteroffset=1cm,
  bleed=5mm,
  final
]{photobook}

\begin{page}
  \begin{pagecell}
    \begin{inlinecell}{10cm}{10cm}
       \imagecell{}{square}
    \end{inlinecell}
    \begin{inlinecell}{10cm}{10cm}
       \imagecell{}{square}
    \end{inlinecell}
    \begin{inlinecell}{10cm}{10cm}
       \imagecell{}{square}
    \end{inlinecell}
    \begin{inlinecell}{10cm}{10cm}
       \imagecell{}{square}
    \end{inlinecell}
  \end{inlinecell}
\end{page}

I would have expected to see four squares "nicely arranged" next to each other. However, this is the result:

Do you have an idea why the four images are not stacked nicely?

Second issue. I was trying to understand how to make my code cleaner, and I read in the manual that cell environments "register" their offset - allowing to "locate" them so to speak. For this, here you use \setlength\celloffsettop{\photobook@cell@offset[1]}. Shouldn't it be \celloffsetleft that is updated here? I assume that the offset in \photobook@cell@offset[1] is (x, y), maybe that's my mistake.
Also, I am trying to use the \celloffsetleft parameter to position cells relative to each other, but still using cell instead of inlinecell. I tried the following:
\begin{page}
    \begin{cell}{\bleed,\bleed}{\paperwidth}{\paperheight}
        \begin{cell}{\celloffsetleft+\bleed,\celloffsettop+\bleed}{10cm}{10cm}
        \imagecell{}{square}
            \begin{cell}{\celloffsetleft+\bleed,\celloffsettop+\bleed}{10cm}{10cm}
                \imagecell{}{square}
                \begin{cell}{\celloffsetleft+\bleed,\celloffsettop+\bleed}{10cm}{10cm}
                    \imagecell{}{square}
                \end{cell}
            \end{cell}
        \end{cell}
    \end{cell}
\end{page}

Which, to my understanding, should be able to repeat the picture while shifting it towards the bottom right corner. However, this is not the case. What happens is that the picture is shifted only once towards the right. Any idea why this may be happening?

Finally, I encountered a problem while working with "real" images - instead of the test one, that was just 512x512. When using "large" images I encounter an Arithmetic overflow error. Here is an example to reproduce it with this picture:
\documentclass[%
  layoutmode=block,
  blockwidth=20cm,
  blockheight=20cm,
  imageblockwidth=1.0,
  imageblockheight=1.0,
  bleed=2mm,
  final
]{photobook}

\begin{document}

  % IMAGE CREDITS
  % Photo by Mohamed Almari from Pexels: https://www.pexels.com/photo/golden-gate-bridge-san-francisco-1591382/

  \begin{page}
    \begin{cell}{2cm, 1cm}{10cm}{15cm}
      \imagecell[fill]{}{image.jpg}
    \end{cell}
  \end{page}

\end{document}

\documentclass[%
  layoutmode=block,
  blockwidth=22cm,
  blockheight=20cm,
  imageblockwidth=1.0,
  imageblockheight=1.0,
  bindingoffset=1cm,
  gutteroffset=1cm,
  bleed=5mm,
  final
]{photobook}

\begin{page}
  \begin{pagecell}
    \begin{inlinecell}{10cm}{10cm}
       \imagecell{}{square}
    \end{inlinecell}
    \begin{inlinecell}{10cm}{10cm}
       \imagecell{}{square}
    \end{inlinecell}
    \begin{inlinecell}{10cm}{10cm}
       \imagecell{}{square}
    \end{inlinecell}
    \begin{inlinecell}{10cm}{10cm}
       \imagecell{}{square}
    \end{inlinecell}
  \end{inlinecell}
\end{page}

Don't know how you managed to build this without a document but...
Here's a working version ;)
\documentclass[%
  layoutmode=block,
  blockwidth=22cm,
  blockheight=20cm,
  imageblockwidth=1.0,
  imageblockheight=1.0,
  bindingoffset=1cm,
  gutteroffset=1cm,
  bleed=5mm,
  final
]{photobook}

\begin{document}%
%
\begin{page}%
  \begin{pagecell}%
    \begin{inlinecell}{10cm}{10cm}%
       \imagecell{}{square}%
    \end{inlinecell}%
    \begin{inlinecell}{10cm}{10cm}%
       \imagecell{}{square}%
    \end{inlinecell}%
    \newline%
    \begin{inlinecell}{10cm}{10cm}%
       \imagecell{}{square}%
    \end{inlinecell}%
    \begin{inlinecell}{10cm}{10cm}%
       \imagecell{}{square}%
    \end{inlinecell}%
  \end{pagecell}%
\end{page}%
%
\end{document}

Ok, I think that now I understand my... misunderstanding! Basically, the bleed is invisible in the pdf viewer, but it is there. The red rectangle in the picture I attached is actually the visible page already. And the margin I have added in the internal part should be "manually" offset by the gutter and binding offset as needed - since I am using "absolute positioning".
So to make it clear (at least to me) the snippet
\begin{page}
  \begin{cell}{0pt, 0pt}{\paperwidth}{\paperheight}
    \imagecell{}{img.jpg}
  \end{cell}
\end{page}

creates a "full page image" that is "good" for printing and cutting. If I used just  \begin{cell}{\bleed, \bleed}{\blockwidth}{\blockheight} the pdf would have been ok but printing is troublesome - because I am not bleeding.

Yep =)

@francofusco

\begin{page}
    \begin{cell}{\bleed,\bleed}{\paperwidth}{\paperheight}
        \begin{cell}{\celloffsetleft+\bleed,\celloffsettop+\bleed}{10cm}{10cm}
        \imagecell{}{square}
            \begin{cell}{\celloffsetleft+\bleed,\celloffsettop+\bleed}{10cm}{10cm}
                \imagecell{}{square}
                \begin{cell}{\celloffsetleft+\bleed,\celloffsettop+\bleed}{10cm}{10cm}
                    \imagecell{}{square}
                \end{cell}
            \end{cell}
        \end{cell}
    \end{cell}
\end{page}

This I'll have to investigate a bit deeper, might be a bug... (I've not touched the code here for some time)

Finally, I encountered a problem while working with "real" images - instead of the test one, that was just 512x512. When using "large" images I encounter an Arithmetic overflow error. Here is an example to reproduce it with this picture:

The link you included returns an empty JSON object, at least for me...
How large was the image? (pixel size, dpi, color depth)

Don't know how you managed to build this without a document but...

Because I'm the god of LaTeX of course! 😃 Jokes aside, I think I messed something while re-formatting it here in the issue, since the original script that contains the page is a bit longer. I confirm that the snippet as you posted it works as intended, so it must be my tinkering that has messed up something. I'll try to understand the root of the issue and report back if needed!

@francofusco

Finally, I encountered a problem while working with "real" images - instead of the test one, that was just 512x512. When using "large" images I encounter an Arithmetic overflow error. Here is an example to reproduce it with this picture:

The link you included returns an empty JSON object, at least for me...
How large was the image? (pixel size, dpi, color depth)

Ah that's weird. For me it redirects to a page where you can see the image below:

The resolution is 5304x6630. I just tested it to make sure the issue is not (again) caused by my tinkering - and indeed, I think I'm innocent this time!
\documentclass[%
  layoutmode=block,
  blockwidth=20cm,
  blockheight=20cm,
  imageblockwidth=1.0,
  imageblockheight=1.0,
  bleed=2mm,
  final
]{photobook}

\begin{document}
    \ImagePageClear{}{images/goldenbridge} % This is ok!
    \ImagePageFill{}{images/goldenbridge} % This fails :(
\end{document}

Finally, I encountered a problem while working with "real" images - instead of the test one, that was just 512x512. When using "large" images I encounter an Arithmetic overflow error. Here is an example to reproduce it with this picture:

OK, seems that I can reproduce this with image of height over 3989px and/or width over 4999px.... really odd....

I don't want to say something stupid, but if I remember correctly, LaTeX uses (I want to say) 16 bits for numbers, which is not a lot (2^16 is about 65k). Maybe in some calculations the limit is reached, that would make sense given the type of error.

2^16

Yes, an overflow somewhere is the primary hypothesis here, but what's confusing is both the different thresholds for height and width and the distance between 216 and these values, especially considering the math involved =)


Direct DB connection does not work with ONLY_FULL_GROUP_BY option enabled

If ONLY_FULL_GROUP_BY MySQL option enabled, queries fail. This option is enabled by default since MySQL 5.7.5.

Reject queries for which the select list, HAVING condition, or ORDER BY list refer to nonaggregated columns that are neither named in the GROUP BY clause nor are functionally dependent on (uniquely determined by) GROUP BY columns.

Can you describe an error you get?

no error as such. I just don't see any data on the default zabbix demo dashboard when the direct DB connection is enabled.

SQL queries generated by grafana-zabbix plugin fails if you have ONLY_FULL_GROUP_BY sql mode enabled on your db. https://stackoverflow.com/questions/23921117/disable-only-full-group-by

Sweet. Thanks for that, I tired it and it worked! Thank you so much.

Thanks guys for the help.

@inkonthebrink @nayra123 reopened it with new description.

ONLY_FULL_GROUP_BY description:
https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_only_full_group_by

Fixed in 35f89bf97ac7b3fddb485978adea8b44b83641ee


Using the tailwind/ui plugin causes an undefined error

Version
@nuxtjs/tailwindcss: ^6.2.0
nuxt: 3.0.0
@tailwindcss/typography: ^0.5.8
@tailwindcss/ui: ^0.7.2
Reproduction Link

I haven't created one yet, but the example on the official docs is failing also
Steps to reproduce

Fresh Nuxt 3.0 project
Add Tailwind
Add tailwind/ui

What is Expected?
Successful build
What is actually happening?
Looks like a CJS / ESM issue perhaps when the tailwindcss/typography plugin is trying to load the default theme
WARN  Failed to load Tailwind config at: ./tailwind.config.js Cannot read properties of undefined (reading '700')

  at D:/Projects/website/node_modules/.pnpm/@tailwindcss+typography@0.2.0/node_modules/@tailwindcss/typography/src/styles.js:14:38

Overriding the version of @tailwindcss/typography that @tailwindcss/ui uses internally fixes the issues, but I'm unsure of any other side effects.
 "pnpm": {
    "overrides": {
      "@tailwindcss/typography": "^0.5.8"
    }
  }

Has this been fixed or just closed without comment?

Hi, sorry I was doing an issue cleanup for the repository. Are you still experiencing this on the latest versions?
From my understanding, it seems to be a Tailwind configuration issue.
If using colors, use tailwindcss/colors: https://tailwindcss.com/docs/customizing-colors#using-the-default-colors
See related: #659


Some links can't be clicked due to excessive header padding

The /3pid/onbind link is obscured here.

Should be fixed now by https://github.com/wbamberg/matrix-hugo/commit/df82430705e8559d093a3316c32548a2a1f34480 .


refactor(spanner): improve Option discoverability by having a single spanner/options.h

Part of https://github.com/googleapis/google-cloud-cpp/issues/5738
This PR improves Option discoverability for users by putting all spanner-specific user-tweakable options in a single file: spanner/options.h. This gives users a single place to find all the options. This file also includes a file-level comment
explaining how users should use options.
All options in spanner/options.h will become public, user-facing options in the spanner:: namespace soon (as soon as we make google::cloud::internal::Options public too).
Each function that accepts Options should still document which sets of options it expects.
Renamed internal/options* to internal/defaults* to more clearly indicate that it's only for computing default values for options, not defining options themselves.
There's no semantic change in this PR

This change is

Hmm. There's a strange seems-to-be-unrelated clang-tidy error: https://source.cloud.google.com/results/invocations/915e4790-b19a-41de-b95f-111dc444d857/targets/cloud-cpp%2Fgithub%2Fgoogle-cloud-cpp%2Fmaster%2Fdocker%2Fclang-tidy-presubmit/log

Any idea how to get around this issue? All I can think of is make clang-tidy not a required build, submit, then re-enable it.

I think I fixed the clang-tidy issue by adding an empty google/cloud/spanner/options.cc file. For some reason, that was causing clang-tidy '-p=cmake-out/ci-fedora-install-33-clang-tidy' '--checks=-misc-unused-using-decls,-readability-redundant-declaration' google/cloud/spanner/options.h to complain about non-sense.


[IDEA] Change set of questions during event setup

Proposed Bot Improvement:
Currently the bot has a pre-configured "lfg start" command, and I didn't find the questions to be super helpful. Is there a way for you to add something so that I can customize the questions asked in the survey? I understand if you are unable to since I know nothing about coding, but I figured I would make the suggestion.
Thanks

Hello @lSnazzyl
Thank you for your idea.
I don't think that I'm going to add custom questions support in the near future, as it will increase the load on the server and may affect bot's responsiveness. However, I will consider the possibility and will assess the performance impact of this feature. Thank you.
However, we still can work on the existing survey - if you have any better set of questions, feel free to post them here. Maybe together we will come up to a better set of question.

As there was no response for a month already, I am closing this ticket.

As there was no response for a month already, I am closing this ticket.


New Stack operations #44: isEmpty

Hi fern4lvarez,
This pull request fixes the code reviews from https://github.com/fern4lvarez/piladb/pull/65

Pull request merging to dev-0.2 instead of master
change handler and api name to empty to conform naming convention
Implement Empty function in stack.go
Enforce 100% code test coverage.
Allow maintainer to edit pull request.

Description:
Added isEmpty functionality to api. Now client can access is_empty rest call to
determine if the stack associated to the pass in stack id and db id is empty or not.

Testing Methodology:
Verify the following curl call will return is_empty = false

    curl -XPUT "localhost:1205/databases?name=MY_DATABASE"
    curl -XPUT "localhost:1205/databases/MY_DATABASE/stacks?name=BOOKSHELF"
    curl -XPOST localhost:1205/databases/MY_DATABASE/stacks/BOOKSHELF \
        -d '{"element":{"title":"1984","author":"George Orwell","ISBN":"1595404325","comments":[]}}'
    curl "localhost:1205/databases/MY_DATABASE/stacks/BOOKSHELF?is_empty"

Verify the following curl call will return is_empty = true

        curl -XPUT "localhost:1205/databases?name=MY_DATABASE"
        curl -XPUT "localhost:1205/databases/MY_DATABASE/stacks?name=BOOKSHELF"
        curl "localhost:1205/databases/MY_DATABASE/stacks/BOOKSHELF?is_empty"

Verify that empty db or stack will have standard empty response

Codecov Report

Merging #67 into dev-0.2 will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           dev-0.2    #67    +/-   ##
=======================================
  Coverage      100%   100%
=======================================
  Files           16     18     +2
  Lines          657    778   +121
=======================================
+ Hits           657    778   +121

Impacted Files
Coverage Δ

pila/stack.go
100% <100%> (ø)
:arrow_up:

pilad/conn.go
100% <100%> (ø)
:arrow_up:

config/config.go
100% <0%> (ø)
:arrow_up:

main.go

pilad/main.go
100% <0%> (ø)

pkg/stack/stack.go
100% <0%> (ø)

pilad/config.go
100% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de1a46f...9c6c4b3. Read the comment docs.

This looks great now 👌
I added some small fixes, mostly formatting, wording and naming related. Then with a bit of time I'll try the functionality itself, update CHANGELOG and Merge :star:
@jlr52 can you in the meantime update the pilad README.md file? Adding something like this, but for EMPTY? https://github.com/fern4lvarez/piladb/blob/master/pilad/README.md#get-databasesdatabase_idstacksstack_idsize
Thanks and great work!

@fern4lvarez
For sure, I will update it docs on my next pull request. Thanks for fixing the coding styles and mismatch %v, I will be more meticulous next time.

@jlr52 you can do it in this same PR.

Doc is added.

Merged :tada:


gameplay improvement

the npc ball need to

be of diffrent sizes at start
have sarting speed
need to be able to colide and grow

aborbtion should be all at once
mass transfer only if balls a touching (so if a ball only striffs another there is only a slight mass transfer)
so we have a a gradual mass transfer (watch osmos game for that)
speed booster
shif key to run for a short time but loose some masse (in form of an ejected npc ball behind the player)

Yea that would be nice! but:

The size this is easy to solve (at the create element you can assign size for these).
Also easy to solve (also at the creation of the element) but this won't work as they are upgrades!

But we need to first!

They cannot move yet as the server think they are upgrade and not NPC.
So this should go after the upgrade to the server.
I was thinking this where initial upgrade not NPC!
We could also create NPC and have them move around but this would need also to have some Server upgrade.
I think we should first have a game that is playable before do that.

The shift key would be nice! (and relatively easy to implement).

In fact after reflexion I think this is a bad idea we have 5 minutes to convince people if we add too much button it will just confuse them...

It would be more interesting to have you use some of your mass every time you change direction!

I'd like first to find good default parameters!
// PlayerParameter
// Next: 12
message PlayerParameter {
    // Vertical speed (jumping).
    double vertical_speed = 1;
    // Horizontal speed (running).
    double horizontal_speed = 2;
    // Player start mass.
    double start_mass = 3;
    // Player drop height (start at planet radius and add this value).
    double drop_height = 4;
    // Penalty for eating too similar to player color.
    double penalty = 5;
    // Move cost in mass value.
    double living_cost = 6;
    // Friction (this will stop the move at a certain point).
    double friction = 7;
    // Victory size (in volume).
    double victory_size = 8;
    // Disconnection timeout.
    double disconnection_timeout = 9;
    // Eating speed.
    double eat_speed = 10;
    // Color list.
    repeated ColorParameter colors = 11;
}


Can not perform action in custom IPN listener

Hello,
I'm trying to perform an action in a custom IPN listener, but it does not seem to work.
vendor/lexik/paybox-bundle/Resources/config/routing.yml :
lexik_paybox_ipn:
    path:     /payment-ipn/{time}
    defaults: { _controller: LexikPayboxBundle:Default:ipn }
    methods:  [GET, POST]

lexik_paybox_membership_return:
    path:     /payment/return/{status}
    defaults: { _controller: AppBundle:Membership:return, status: error }
    requirements:
        status: success|canceled|denied

vendor/lexik/paybox-bundle/Resources/config/services.yml :
parameters:
    lexik_paybox.request_handler.class:              'Lexik\Bundle\PayboxBundle\Paybox\System\Base\Request'
    lexik_paybox.request_cancellation_handler.class: 'Lexik\Bundle\PayboxBundle\Paybox\System\Cancellation\Request'
    lexik_paybox.response_handler.class:             'Lexik\Bundle\PayboxBundle\Paybox\System\Base\Response'
    lexik_paybox.direc_plus.request_handler:         'Lexik\Bundle\PayboxBundle\Paybox\DirectPlus\Request'
    lexik_paybox.membership_response_listener.class: 'AppBundle\Controller\MembershipIpnListener'

services:
    lexik_paybox.request_handler:
        class:     '%lexik_paybox.request_handler.class%'
        arguments: ['%lexik_paybox.parameters%', '%lexik_paybox.servers%'<EMAIL_ADDRESS>
    lexik_paybox.request_cancellation_handler:
        class:     '%lexik_paybox.request_cancellation_handler.class%'
        arguments: ['%lexik_paybox.parameters%', '%lexik_paybox.servers%'<EMAIL_ADDRESS>
    lexik_paybox.response_handler:
        class:     '%lexik_paybox.response_handler.class%'
        arguments: ['@request_stack', '@logger', '@event_dispatcher', '%lexik_paybox.parameters%']
        tags:
            - { name: monolog.logger, channel: payment }

    lexik_paybox.direc_plus.request_handler:
        class:     '%lexik_paybox.direc_plus.request_handler%'
        arguments: ['%lexik_paybox.parameters%', '%lexik_paybox.servers%', '@logger', '@event_dispatcher', <EMAIL_ADDRESS>        tags:
            - { name: monolog.logger, channel: payment }

    lexik_paybox.transport:
        class:     '%lexik_paybox.transport.class%'

    lexik_paybox.membership_response_listener:
        class:     '%lexik_paybox.membership_response_listener.class%'
        arguments: ['%kernel.root_dir%', '@filesystem']
        tags:
            - { name: kernel.event_listener, event: paybox.ipn_response, method: onPayboxIpnResponse }

src/AppBundle/Controller/MembershipController.php :
<?php

namespace AppBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

use Symfony\Component\Routing\Generator\UrlGeneratorInterface;

/**
 * Class MembershipController
 *
 * @package Lexik\Bundle\PayboxBundle\Controller
 *
 * @author Lexik<EMAIL_ADDRESS> * @author Olivier Maisonneuve<EMAIL_ADDRESS> */
class MembershipController extends Controller
{
    /**
     * OneYear action creates the form for a one year membership payment call.
     *
     * @return Response
     */
    public function OneYearAction()
	{

		$user = ParseUser::getCurrentUser();
		$email = $user->get('email');

		$paybox = $this->get('lexik_paybox.request_handler');
		$paybox->setParameters(array(
			'PBX_CMD'          => 'CMD-' . $user->getObjectId() . '-190-' .time(),
			'PBX_DEVISE'       => '978',
			'PBX_PORTEUR'      => $email,
			'PBX_RETOUR'       => 'Mt:M;Ref:R;Auto:A;Erreur:E',
			'PBX_TOTAL'        => '1490',
			'PBX_TYPEPAIEMENT' => 'CARTE',
			'PBX_TYPECARTE'    => 'CB',
			'PBX_EFFECTUE'     => $this->generateUrl('lexik_paybox_membership_return', array('status' => 'success'), UrlGeneratorInterface::ABSOLUTE_URL),
			'PBX_REFUSE'       => $this->generateUrl('lexik_paybox_membership_return', array('status' => 'denied'), UrlGeneratorInterface::ABSOLUTE_URL),
			'PBX_ANNULE'       => $this->generateUrl('lexik_paybox_membership_return', array('status' => 'canceled'), UrlGeneratorInterface::ABSOLUTE_URL),
			'PBX_RUF1'         => 'POST',
			'PBX_REPONDRE_A'   => $this->generateUrl('lexik_paybox_ipn', array('time' => time()), UrlGeneratorInterface::ABSOLUTE_URL),
		));

		return $this->render(
			'my_bundle/user/membershippayboxform.html.twig',
			array(
				'url'  => $paybox->getUrl(),
				'form' => $paybox->getForm()->createView(),
			)
		);
	}

    /**
     * OneMonth action creates the form for a one month membership payment call.
     *
     * @return Response
     */
    public function OneMonthAction()
	{

		$user = ParseUser::getCurrentUser();
		$email = $user->get('email');

		$paybox = $this->get('lexik_paybox.request_handler');
		$paybox->setParameters(array(
			'PBX_CMD'          => 'CMD-' . $user->getObjectId() . '-1490-' .time(),
			'PBX_DEVISE'       => '978',
			'PBX_PORTEUR'      => $email,
			'PBX_RETOUR'       => 'Mt:M;Ref:R;Auto:A;Erreur:E',
			'PBX_TOTAL'        => '190',
			'PBX_TYPEPAIEMENT' => 'CARTE',
			'PBX_TYPECARTE'    => 'CB',
			'PBX_EFFECTUE'     => $this->generateUrl('lexik_paybox_membership_return', array('status' => 'success'), UrlGeneratorInterface::ABSOLUTE_URL),
			'PBX_REFUSE'       => $this->generateUrl('lexik_paybox_membership_return', array('status' => 'denied'), UrlGeneratorInterface::ABSOLUTE_URL),
			'PBX_ANNULE'       => $this->generateUrl('lexik_paybox_membership_return', array('status' => 'canceled'), UrlGeneratorInterface::ABSOLUTE_URL),
			'PBX_RUF1'         => 'POST',
			'PBX_REPONDRE_A'   => $this->generateUrl('lexik_paybox_ipn', array('time' => time()), UrlGeneratorInterface::ABSOLUTE_URL),
		));

		return $this->render(
			'my_bundle/user/membershippayboxform.html.twig',
			array(
				'url'  => $paybox->getUrl(),
				'form' => $paybox->getForm()->createView(),
			)
		);
	}

    /**
     * Return action for a confirmation payment page on which the user is sent
     * after he seizes his payment informations on the Paybox's platform.
     * This action might only containts presentation logic.
     *
     * @param Request $request
     * @param string  $status
     *
     * @return Response
     */
    public function returnAction(Request $request, $status)
    {

		$request = Request::createFromGlobals();
		$montantAbonnement = $request->query->get('Mt');

        return $this->render('my_bundle/user/membershippayboxreturn.html.twig', array(
            'status'     => $status,
            'parameters' => $request->query,
			'montantAbonnement' => $montantAbonnement
        ));
    }
}

src/AppBundle/Controller/MembershipIpnListener.php :
<?php

namespace AppBundle\Controller;

use Lexik\Bundle\PayboxBundle\Event\PayboxResponseEvent;
use Symfony\Component\Filesystem\Filesystem;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

use Symfony\Component\Routing\Generator\UrlGeneratorInterface;

/**
 * Sample listener that create a file for each ipn call.
 *
 * @author Olivier Maisonneuve<EMAIL_ADDRESS> */
class MembershipIpnListener
{
    /**
     * @var string
     */
    private $rootDir;

    /**
     * @var Filesystem
     */
    private $filesystem;

    /**
     * Constructor.
     *
     * @param string     $rootDir
     * @param Filesystem $filesystem
     */
    public function __construct($rootDir, Filesystem $filesystem)
    {
        $this->rootDir = $rootDir;
        $this->filesystem = $filesystem;
    }

    /**
     * Creates a txt file containing all parameters for each IPN.
     *
     * @param PayboxResponseEvent $event
     */
    public function onPayboxIpnResponse(PayboxResponseEvent $event)
    {
        $path = sprintf('%s/../data/%s', $this->rootDir, date('Y\/m\/d\/'));
        $this->filesystem->mkdir($path);

        $content = sprintf('Signature verification : %s%s', $event->isVerified() ? 'OK' : 'KO', PHP_EOL);
        foreach ($event->getData() as $key => $value) {
            $content .= sprintf("%s:%s%s", $key, $value, PHP_EOL);
        }

        file_put_contents(
            sprintf('%s%s.txt', $path, time()),
            $content
        );

		$firstname = 'firstname';
		$lastname = 'lastname';
		$email = 'email';
		$montantFacture = "14,90";

		$message = \Swift_Message::newInstance()
			->setSubject('Abonnement')
<EMAIL_ADDRESS>			->setTo($email)
<EMAIL_ADDRESS><EMAIL_ADDRESS>			->setBody(
				$this->renderView(
					'my_bundle/user/membershipmessage.html.twig',
					array('firstname' => $firstname, 'lastname' => $lastname, 'email' => $email, 'montantFacture' => $montantFacture)
				),
				'text/html'
			);

		$this->get('mailer')
			->send($message);
    }
}

The redirection to membershippayboxreturn.html.twig works fine after payment, and I get the right info displayed but the Listener should create txt file just like the sample, and send a mail. I get none of those.
I did not write variables yet for the e-mail content for testing purposes.
If I write the mail sending function in returnAction function in src/AppBundle/Controller/MembershipController.php it works fine.
Any idea on what I could have missed here please ? Where could I be wrong ?
Best regards,
David

Hi David,
first of all and keep that in mind in the future, you must never (NEVER) edit files in the vendor/ directory 💯
I'm not really sure this is the right way to specify the file path, maybe you should try the official symfony method with kernelrootdir variable
$path = sprintf('%s/../data/%s', $this->rootDir, date('Y\/m\/d\/'));
$this->get('kernel')->getRootDir();
And if you want the web root:
$this->get('kernel')->getRootDir() . '/../web' . $this->getRequest()->getBasePath();

Hi, thanks for your answer.
First thing, the only files I wrote are :
vendor/lexik/paybox-bundle/Resources/config/routing.yml
and
vendor/lexik/paybox-bundle/Resources/config/services.yml
I tought it was right.
What would be the appropriate thing to do please ?
I found the file path in your SampleIpnListener.php file.
I'll try some workarounds on the path and tell you how it's working.
The mail fiunction does not work neither, so I thought the src/AppBundle/Controller/MembershipIpnListener.php file was not called properly or that the onPayboxIpnResponse function was not triggered.

The files you have to edit are in your AppBundle/ directory
if you update your deps with composer, you will lose everything

I had another piece of script to create txt file to store transactions :
$IdTransaction = 'Transaction:"' . $request->query->get('Ref') . '-' . $request->query->get('Sign') . '"' . PHP_EOL;
					$fp = fopen($this->get('kernel')->getRootDir() . '/PBRecords/transactions.txt', 'a');
					fwrite($fp, $IdTransaction);
					fclose($fp);

It's triggered and working fine in
src/AppBundle/Controller/MembershipController.php
but not in :
src/AppBundle/Controller/MembershipIpnListener.php
and I can't seem to find the issue..

Sorry, it's my first Symfony website, I do not have all the best practices.
I wrote my changes in :
vendor/lexik/paybox-bundle/Resources/config/routing.yml
to
app/config/routing.yml
and the changes in :
vendor/lexik/paybox-bundle/Resources/config/services.yml
to
app/config/services.yml
Better like that ?

I think the problem might be that I do not get to find where lexik_paybox.sample_response_listener is called.. ?
I can see lexik_paybox_ipn is being called though, but it's associated to vendor/lexik/paybox-bundle/Controller/DefaultController.php..
I would need to know where I can safely put my actions when the payment is OK. When I put them in src/AppBundle/Controller/MembershipController.php they're working fine, but too easy to be hacked as they rely on the url in the user's browser.
Any help would really be appreciated.

If you are you doing your tests in dev environment, the paybox system can't access your IPN
If you are using a dev computer that is behind a firewall, same issue
I usually test IPN on production system

OK thank you for the info.
By production environment, you mean Symfony ? Or both Symfony and Lexik bundle ?
Can I still use preprod parameters form PayBox to test ?

I mean symfony and your web server.
In your controller, when using the setParameters method, you specify a key called 'PBX_REPONDRE_A'.
In your MembershipController, it's the line :
'PBX_REPONDRE_A'   => $this->generateUrl('lexik_paybox_ipn', array('time' => time()), UrlGeneratorInterface::ABSOLUTE_URL),
This means a request is silently sent to the paybox preprod server to call the IPN. If the paybox server can't access your environment (and i mean firewalls and stuff), then the IPN won't do anything :)
So, short answer, it's symfony/web server prod environment + LexikBundle : preprod for testing (and prod when everything is working)

Thanks again !
That's what I thought yes after pulling my hair for quite a while.
As I could not see what could be wrong in my code, I asked the guy managing server (for this project it's unfortunately not me) to open it all so I can test, because the access to the website is now blocked with login and password. I'm waiting for a change on his side to continue testing.

It works way better in production mode indeed, thanks !
I would have one more question please, how can I call transaction parameters in
public function onPayboxIpnResponse(PayboxResponseEvent $event)
I would need to put some if statements on status and Mt.

I managed to retreive some info in public function onPayboxIpnResponse(PayboxResponseEvent $event)
$transactionId = $event->getData()['Ref'];
$montantAbonnement = $event->getData()['Mt'];

I just have to write an if statement now there if the transaction is successful.

Yes that's how it works

Yes, I figured that out.
I'm still having some issues, as the IPN controller is declared as a service, I can not use some functions like ->get() in public function onPayboxIpnResponse(PayboxResponseEvent $event).
I called them successfully in public function returnAction(Request $request, $status) for testing purposes, but that was not very secure.
So I'm close, but I still have some workarounds to find out.

Do you think I could send some variables from :
'PBX_REPONDRE_A'   => $this->generateUrl('lexik_paybox_ipn', array('time' => time()), UrlGeneratorInterface::ABSOLUTE_URL)
using the array ?
I was thinking of something like :
'PBX_REPONDRE_A'   => $this->generateUrl('lexik_paybox_ipn', array('time' => time() , 'email' => $email), UrlGeneratorInterface::ABSOLUTE_URL)
as I get email info using :
$user = ParseUser::getCurrentUser();
$email = $user->get('email');

just before :
$paybox = $this->get('lexik_paybox.request_handler');
$paybox->setParameters(array(...

?
Sorry for bothering so much, but I'm really getting crazy on this one.
I can't seem to use Parse PHP SDK as a service like I did with doctrine to store transactions instead of creating .txt files, that's blocking me..

Well that seemd to be the good idea..
For info I take a look at http://symfony.com/doc/current/service_container/request.html
I just have to manage to be able to use
$user->set(...
now to finish..

I think you have lost yourself ^^
I don't really understand what you are trying to do but i guess you want to link an order to a user.
Personally, i use the Ref variable, it's the order number. When i initiate a payment, i tell paybox the order number, it's the same as
'PBX_CMD'          => 'CMD-' . $user->getObjectId() . '-190-' .time(),
Once i have the Ref variable, i look for it using the entity manager. Your Listener must have access to the entity manager. Here is how to do it :
    app_bundle.paybox_response_listener:
        class: App\AppBundle\Listener\PayboxListener
        arguments: [<EMAIL_ADDRESS>'@mailer' ]
        tags:
            - { name: kernel.event_listener, event: paybox.ipn_response, method: onPayboxIpnResponse }

I have also injected the mailer service to send emails in my listener calls.
This is an example of a Listener i use :
<?php

/**
 * Description of PayboxListener
 *
 * @author James ASHTON
 */

namespace App\FooBundle\Listener;

use Lexik\Bundle\PayboxBundle\Event\PayboxResponseEvent;

/**
 * Simple listener that adds application logic.
 */
class PayboxListener {

    private $em;
    private $mailer;

    /**
     * Constructor.
     *
     * @param         $em
     * @param         $mailer
     */
    public function __construct($em, $mailer) {
        $this->em = $em;
        $this->mailer = $mailer;
    }

    /**
     *
     * @param  PayboxResponseEvent $event
     */
    public function onPayboxIpnResponse(PayboxResponseEvent $event) {
        $data = $event->getData();
        $date = new \DateTime();

        //  here my Ref order number is the same as the id of the order
        $entity = $this->em->getRepository('FooBundle:Order')->find($data['Ref']);

        if ($data['Erreur'] == '00000') {
            $entity->setPaymentStatus('Confirmed');
            $entity->setPaymentCode($data['Erreur']);
        } else {
            $entity->setPaymentStatus('Error');
            $entity->setPaymentCode($data['Erreur']);
        }

        $entity->setPaymentTotal($data['Mt']);
        $entity->setPaymentDate($date);

        $this->em->persist($entity);
        $this->em->flush();

        foreach ($event->getData() as $key => $value) {
            $content .= sprintf("%s:%s\n", $key, $value);
        }

        $message = \Swift_Message::newInstance()
                ->setSubject('Payment notification')
<EMAIL_ADDRESS><EMAIL_ADDRESS>                ->setBody($content, 'text/html')
        ;

        $this->mailer->send($message);
    }

}

Yes, regarding Doctrine and mailer, I made them work, but I had some hard time to get user inbfo from Parse Database as I do not use symfony user bundle.
I have to connect to databse, to get info, that's OK with the variables I added in 'PBX_REPONDRE_A' array, although it seems you can not pass more than a defined amount of bvariables / data.
The only thing I have still to test is send information to Parse Database, that's where I store membership expiration date for each user.
Anyway, thanks a lot again for support and concern !

As I thought, as I could not use
$user->get('...');
in the listener, problem I manged to solve using requestStack.
I can also not use
$user->set('...');
or
$user->addUnique('...');
Here's my code in case you got an idea for me..
MembershipController :
<?php

namespace AppBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;

/* PARSE SDK */
use Parse\ParseClient;
$app_id = "****************************************";
$rest_key = "****************************************";
$master_key = "****************************************";
ParseClient::initialize($app_id, $rest_key, $master_key);
ParseClient::setServerURL('https://parse.my-domain.com','parse');
use Parse\ParseObject;
use Parse\ParseQuery;
use Parse\ParseACL;
use Parse\ParsePush;
use Parse\ParseUser;
use Parse\ParseInstallation;
use Parse\ParseException;
use Parse\ParseAnalytics;
use Parse\ParseFile;
use Parse\ParseCloud;
/* PARSE SDK */

/**
 * Class MembershipController
 *
 * @package Lexik\Bundle\PayboxBundle\Controller
 *
 * @author Lexik<EMAIL_ADDRESS> * @author Olivier Maisonneuve<EMAIL_ADDRESS> */
class MembershipController extends Controller
{

    /**
     * OneMonth action creates the form for a one month membership payment call.
     *
     * @return Response
     */
    public function OneMonthAction()
	{

		$user = ParseUser::getCurrentUser();
		$userid = $user->getObjectId();
		$email = $user->get('email');
		$expirationdate = $user->get('ExpirationDate');
		if (!empty($expirationdate)) {
			$currentexpirationdate = end($expirationdate);
		}
		else {
			$currentexpirationdate = $today;
		}

		$paybox = $this->get('lexik_paybox.request_handler');
		$paybox->setParameters(array(
			'PBX_CMD'          => 'CMD-' . $user->getObjectId() . '-190-' .time(),
			'PBX_DEVISE'       => '978',
			'PBX_PORTEUR'      => $email,
			'PBX_RETOUR'       => 'Mt:M;Ref:R;Auto:A;Erreur:E',
			'PBX_TOTAL'        => '190',
			'PBX_TYPEPAIEMENT' => 'CARTE',
			'PBX_TYPECARTE'    => 'CB',
			'PBX_EFFECTUE'     => $this->generateUrl('lexik_paybox_membership_return', array('status' => 'success'), UrlGeneratorInterface::ABSOLUTE_URL),
			'PBX_REFUSE'       => $this->generateUrl('lexik_paybox_membership_return', array('status' => 'denied'), UrlGeneratorInterface::ABSOLUTE_URL),
			'PBX_ANNULE'       => $this->generateUrl('lexik_paybox_membership_return', array('status' => 'canceled'), UrlGeneratorInterface::ABSOLUTE_URL),
			'PBX_RUF1'         => 'GET',
			'PBX_REPONDRE_A'   => $this->generateUrl('lexik_paybox_ipn', array('time' => time() , 'user' => $user , 'userid' => $userid , 'email' => $email , 'currentexpirationdate' => $currentexpirationdate), UrlGeneratorInterface::ABSOLUTE_URL),
		));

		return $this->render(
			'my_bundle/user/membershippayboxform.html.twig',
			array(
				'url'  => $paybox->getUrl(),
				'form' => $paybox->getForm()->createView(),
			)
		);
	}

    /**
     * OneYear action creates the form for a one year membership payment call.
     *
     * @return Response
     */
    public function OneYearAction()
	{

		$user = ParseUser::getCurrentUser();
		$userid = $user->getObjectId();
		$email = $user->get('email');
		$expirationdate = $user->get('ExpirationDate');
		if (!empty($expirationdate)) {
			$currentexpirationdate = end($expirationdate);
		}
		else {
			$currentexpirationdate = $today;
		}

		$paybox = $this->get('lexik_paybox.request_handler');
		$paybox->setParameters(array(
			'PBX_CMD'          => 'CMD-' . $user->getObjectId() . '-1490-' .time(),
			'PBX_DEVISE'       => '978',
			'PBX_PORTEUR'      => $email,
			'PBX_RETOUR'       => 'Mt:M;Ref:R;Auto:A;Erreur:E',
			'PBX_TOTAL'        => '1490',
			'PBX_TYPEPAIEMENT' => 'CARTE',
			'PBX_TYPECARTE'    => 'CB',
			'PBX_EFFECTUE'     => $this->generateUrl('lexik_paybox_membership_return', array('status' => 'success'), UrlGeneratorInterface::ABSOLUTE_URL),
			'PBX_REFUSE'       => $this->generateUrl('lexik_paybox_membership_return', array('status' => 'denied'), UrlGeneratorInterface::ABSOLUTE_URL),
			'PBX_ANNULE'       => $this->generateUrl('lexik_paybox_membership_return', array('status' => 'canceled'), UrlGeneratorInterface::ABSOLUTE_URL),
			'PBX_RUF1'         => 'GET',
			'PBX_REPONDRE_A'   => $this->generateUrl('lexik_paybox_ipn', array('time' => time() , 'user' => $user , 'userid' => $userid , 'email' => $email , 'currentexpirationdate' => $currentexpirationdate), UrlGeneratorInterface::ABSOLUTE_URL),
		));

		return $this->render(
			'my_bundle/user/membershippayboxform.html.twig',
			array(
				'url'  => $paybox->getUrl(),
				'form' => $paybox->getForm()->createView(),
			)
		);
	}

    /**
     * Return action for a confirmation payment page on which the user is sent
     * after he seizes his payment informations on the Paybox's platform.
     * This action might only containts presentation logic.
     *
     * @param Request $request
     * @param string  $status
     *
     * @return Response
     */
    public function returnAction(Request $request, $status)
    {

        return $this->render('my_bundle/user/membershippayboxreturn.html.twig', array(
            'status'     => $status,
            'parameters' => $request->query
        ));
    }
}

MembershipIpnListener.php :
<?php

namespace AppBundle\Controller;

use Lexik\Bundle\PayboxBundle\Event\PayboxResponseEvent;
use Symfony\Component\Filesystem\Filesystem;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\RequestStack;

use Symfony\Component\Routing\Generator\UrlGeneratorInterface;

use Symfony\Component\DependencyInjection\ContainerInterface;

/* Transaction en BDD */
use AppBundle\Entity\Transactions;
use Doctrine\ORM\EntityManagerInterface;
/* Transaction en BDD */

/* PARSE SDK */
use Parse\ParseClient;
$app_id = "***************************************";
$rest_key = "***************************************";
$master_key = "***************************************";
ParseClient::initialize($app_id, $rest_key, $master_key);
ParseClient::setServerURL('https://parse.my-domain.com','parse');
use Parse\ParseObject;
use Parse\ParseQuery;
use Parse\ParseACL;
use Parse\ParsePush;
use Parse\ParseUser;
use Parse\ParseInstallation;
use Parse\ParseException;
use Parse\ParseAnalytics;
use Parse\ParseFile;
use Parse\ParseCloud;
/* PARSE SDK */

/**
 * Sample listener that create a file for each ipn call.
 *
 * @author Olivier Maisonneuve<EMAIL_ADDRESS> */
class MembershipIpnListener
{
    /**
     * @var string
     */
    private $rootDir;

    /**
     * @var Filesystem
     */
    private $filesystem;

    protected $em;
	protected $twig;
    protected $mailer;

    /**
     * Constructor.
     *
     * @param string     $rootDir
     * @param Filesystem $filesystem
     */
    public function __construct($rootDir, Filesystem $filesystem, $doctrine, $twig, $mailer, RequestStack $requestStack)
    {
        $this->rootDir = $rootDir;
        $this->filesystem = $filesystem;
		$this->em = $doctrine->getManager();
		$this->twig = $twig;
		$this->mailer = $mailer;
		$this->requestStack = $requestStack;
    }

    /**
     * Creates a txt file containing all parameters for each IPN.
     *
     * @param PayboxResponseEvent $event
     */
    public function onPayboxIpnResponse(PayboxResponseEvent $event)
    {

		$path = $this->rootDir . '/../data/' . date('Y\/m\/d\/');
        $this->filesystem->mkdir($path);
        $content = sprintf("Signature verification : %s\n", $event->isVerified() ? 'OK' : 'KO');
        foreach ($event->getData() as $key => $value) {
            $content .= sprintf("%s:%s\n", $key, $value);
        }
        file_put_contents($path . time() . '.txt', $content);

		/* RÉCUPÉRATION DES INFOS DE TRANSACTION */
		$transactionId = $event->getData()['Ref'];
		$transactionCode = $event->getData()['Erreur'];
		$montantAbonnement = $event->getData()['Mt'];
		/* RÉCUPÉRATION DES INFOS DE TRANSACTION */

		/* RÉCUPÉRATION DONNÉES PARSE */
		$request = $this->requestStack->getCurrentRequest();
		$user = $request->get('user');
		$userId = $request->get('userid');
		$userEmail = $request->get('email');
		$expirationDate = $request->get('currentexpirationdate');
		/* RÉCUPÉRATION DONNÉES PARSE */

		/* SAUVEGARDE DE LA TRANSACTION EN BDD */
		/* $em = $this->getDoctrine()->getManager(); */
		$em = $this->em;
		$transaction = new Transactions();
		$transaction->setTransactionID($transactionId);
		$transaction->setTransactionCode($transactionCode);
		$transaction->setUserID($userId);
		$transaction->setUserEmail($userEmail);
		$transaction->setDateTransaction(date('Y-m-d\TH:i:s.\0\0\0\Z'));
		$transaction->setMontant($montantAbonnement);
		$transaction->setExpirationDate($nextexpirationDate);
		$em->persist($transaction);
		$em->flush();
		/* SAUVEGARDE DE LA TRANSACTION EN BDD */

		/* VALIDATION ABONNEMENT */
		if ($montantAbonnement == 190) {
			try {
				$nextexpirationdate = date('Y-m-d\TH:i:s.\0\0\0\Z',strtotime(date($currentexpirationdate, time()) . '+1 Month'));
				$user->addUnique("ExpirationDate", array($nextexpirationdate));
				$user->save();
			}
			catch (ParseException $error) {
				echo 'Error message: '.$error->getMessage();
			}
		}
		if ($montantAbonnement == 1490) {
			try {
				$nextexpirationdate = date('Y-m-d\TH:i:s.\0\0\0\Z',strtotime(date($currentexpirationdate, time()) . '+12 Month'));
				$user->addUnique("ExpirationDate", array($nextexpirationdate));
				$user->save();
			}
			catch (ParseException $error) {
				echo 'Error message: '.$error->getMessage();
			}
		}
		/* VALIDATION ABONNEMENT */

		/* ENVOI DU MESSAGE */
		$body = $this->renderTemplate($invoice);

		$message = \Swift_Message::newInstance()
			->setSubject('Abonnement')
<EMAIL_ADDRESS>			->setTo($email)
<EMAIL_ADDRESS><EMAIL_ADDRESS>			->setBody($body,'text/html');

		$this->mailer->send($message);
		/* ENVOI DU MESSAGE */

    }

    public function renderTemplate($invoice)
    {
        return $this->twig->render(
					'webcam_hd/user/membershipmessage.html.twig',
					array('firstname' => $firstname, 'lastname' => $lastname, 'email' => $email, 'montantFacture' => $montantFacture, 'nextexpirationdate' => $nextexpirationdate)
			);
    }
}

Everything seems to work except $user->addUnique('...'); which trows :

php.CRITICAL: Call to a member function addUnique() on null {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function addUnique() on null at ../src/AppBundle/Controller/MembershipIpnListener.php:127)"} []

All because I use Parse php sdk, which I can not seem to use as service or entity.
I know it may not be the best practice, but I have to as I already wrote an iOS app running with Parse sdk to handle users and it has to be synched.

I think I finally managed to find a way to make it all work clean and safe.
I would have one last question though, do you think it would be possible to execute
public function returnAction(Request $request, $status)
after
public function onPayboxIpnResponse(PayboxResponseEvent $event)
has finished to do all its job ?

Hi,
you musn't mix the controller concept that interacts with a browser and the IPN that works behind the scenes without any human intervention.
It doesn't make sense to link those two concepts.
The returnAction is presented to a user, it's sole purpose is to give some information after the payment has succeeded or failed.
The IPN exists because you can't rely on user action to validate a payment. You may think at first that after return you use the IPN but it's not safe to think like that.
You have to separate those two concepts. Only Paybox IPN event can trigger payment validation in your database :)

Hi,
Thanks again for the feedback.
Yes I know, I managed to make the IPN listener validate and store the transaction in the database.
My only problem remaining is that the IPN listener can not "connect" with Parse sdk functions, and I need it to make my system work. I need to update my Parse user after payment, as the listener is a service and not really a controller as I understood, it can not use
user->get('...')
(which I managed to solve with a workaround) but also
$user->addUnique('...')
to make my update, that I can call in returnAction (or another Controller) but not in the IPN listener. That's my problem.

Hi,
What about writing in IpnController
public function ipnAction()
?
Does the controller also get MT, Ref, Erreur... infos ?

Is there a way to use the IPN listener as a controller, and not a service ?

Hi,
I don't know what parseSDK is.
The IPN is a listener, and cannot be a controller, you are mixing concepts here sorry, you have to learn more about symfony, services, dependency injection before using bundles like this one.
I can't answer more here sorry because this goes beyond the scope of this bundle.
Maybe you could try asking on stackoverflow

Hi,
OK, I understand.
Anyway, thanks for you support and concern.
Best regards


bf: ZENKO-576 fix 'supportsVersioning' flag in locations

Orbit management layer now relies on
constants.versioningNotImplBackends to set the 'supportsVersioning'
flag on locations.

Hello jonathan-gramain,
My role is to assist you with the merge of this
pull request. Please type @bert-e help to get
information on this process.
Status report is not available.

Waiting for approval
The following approvals are needed before I can proceed with the merge:

2 peers

@RachedBenMustapha indeed, sorry for rushing a little bit on this!

PR has been updated. Reviewers, please be cautious.

In the queue
The changeset has received all authorizations and has been added to the
relevant queue(s). The queue(s) will be merged in the target development
branch(es) as soon as builds have passed.
The changeset will be merged in:

:heavy_check_mark: development/8.0

The following branches will NOT be impacted:

development/7.4

There is no action required on your side. You will be notified here once
the changeset has been merged. In the unlikely event that the changeset
fails permanently on the queue, a member of Release Engineering will
contact you to help resolve the matter.
IMPORTANT
Please do not attempt to modify this pull request.

Any commit you add on the source branch will trigger a new cycle after the
current queue is merged.
Any commit you add on one of the integration branches will be lost.

If you need this pull request to be removed from the queue, please contact a
member of Release Engineering now.

I have successfully merged the changeset of this pull request
into targetted development branches:

:heavy_check_mark: development/8.0

The following branches have NOT changed:

development/7.4

Please check the status of the associated issue ZENKO-576.
Goodbye jonathan-gramain.


Msgf+ on mzml/fasta pairs

Hi, our lab does quite a bit of MSGF+ searches using prefractionated databases matched with prefractionated spectra (by isoelectric point). We use our own MSGF+ tool XML but it would be nice if this could be in the toolshed instead. The tool takes as input either a spectra and a fasta dataset, or a dataset_collection of a pair of spectra/fasta.
There are 2 problems with this PR:

Breaks workflows/automation by moving the params inside a conditional
I cannot get the planemo tests to work (but the tool works inside galaxy)

This is great! Can you elaborate one the two problems? The first one seems to be OK to me. You can use conditionals in workflows.
Do you have a error of the planemo failure?

I guess the first one is more if someone has a workflow/API automation and the tool is updated, the workflow will also need to be updated because the param names change.
Second point may depend on my setup. I am unfortunately not so used to planemo test yet. I get:
RunToolException: Error creating a job for these tool inputs - History does not include a dataset of the required format / build, History does not include a dataset of the required format / build

I am not sure if this is actually message that comes after the real error/fail though.

UMN does have anybody using the existing MS-GF+ tool or workflows depending on it.   Currently, MS-GF+ is being used via SeaarchGUI.
Unless someone else has a strong objection to this enhancement, I'd vote to merge it.

It seems reasonable to merge and use MS-GF+ via SearchGUI

It is unlikely we are going to find a lot of people using this tool in a github PR. But yeah, it may break someone's workflow, but updates are at your own risk, test it first, etc I guess.
I see I have to condaify the msgfplus.xml also if I want to run planemo test using conda installed msgfplus.

Yes it is possible to have both of all with a bash trick. You ask if this python wrapper exists, if not you use java -jar ... we have this in tools-iuc. Let me know if you need it.


change vehicle size in carla-0.9.9

Carla-0.9.9 current vehicle size is too small，the size deviation is larger than that of some real vehicles.
So I would like to ask if I can change the size of the carla-0.9.9 vehicle.
Thanks.

@whuxhzhang what do you mean the vehicle size is too small? All vehicles we have created have real dimensions and properties. Which vehicle is too small?

@whuxhzhang what do you mean the vehicle size is too small? All vehicles we have created have real dimensions and properties. Which vehicle is too small?

Ok, thanks for your replay.
I need a larger size model of the car，the body is 6m long and 2.24m wide, but not yet in CARLA, so I want to change the vehicle size.