civicrm – Why do I get a 403 response code when submitting changes at /admin/people/permissions?

I have documented the warnings and notices I get
in the drupal watchdog logs at this link:

https://gist.github.com/hesco/1797208819f7b239d8be9deca6b8bac4

I see nothing in apache2 error logs.

I see a WSOD with the message: Not allowed. in the browser.
I see the 403 code in the browser inspect tool’s js concole.
I also see that 403 in the apache2 access logs for every:
POST /admin/people/permissions

submitting the change for a specific user does not change the outcome.

Any thoughts on how I might debug this and resolve it would be appreciated.

Thanks,
— Hugh

How do I avoid caching a redirect response from a form?

I have a Drupal 8 form used by authenticated users which sometimes needs to redirect based on the presence of absence of something in session. I don’t want the redirect to be cached.

My form is displayed directly with a route. i.e., the route has a _form default pointing to the form class.

My buildForm method starts like this:

public function buildForm(array $form, FormStateInterface $form_state) 
{
    $form('#cache') = ('max-age' => 0);

    if (some value not in session) {
        $response = new TrustedRedirectResponse($some_url);
        $response->setMaxAge(0);
        throw new EnforcedResponseException($response);  
    }

    // build the form.
}

I have not been able to avoid the redirect response being cached. It redirects as expected if the session variable does not exist but continues to redirect next time when the session variable does exist.

Users are authenticated so it is the dynamic page cache. drush cr or uninstalling the dynamic page cache “fixes” the problem.

Add a new row each time a new response is added to the Google Form

I have a Google Sheet linked to a Google Form. In the second page I added a formula to clean up the data, since one of the questions allows to chose multiple options and it results in a column with these options separated by comma, in the same column. Therefore, I put a formula in the second page taking this info and separating it into multiple columns:

=ARRAYFORMULA(TRIM(SPLIT('Form responses 1'!H1,",",TRUE,TRUE)))

The problem is that each time a new reply is added by the form, a new row is added to the first page, and then I have to add this formula by hand for the new row.

My question is: Is there any way to do it automatically?

The alternative is to add the formula to all the rows, and allow it to reply with #VALUE! if the row in the first page is empty.

Here is a running example of it: Google Sheet example

Extend Commerce api shipping methods response with custom fields

With commerce api module, you can fetch all available shipping methods of an order with a GET request on {{host}}/jsonapi/checkout/{{cart_uuid}}/shipping-methods. Result is something like this:

    {
        "type": "shipping-rate-option",
        "id": "3--default",
        "attributes": {
            "shipping_method_id": "3",
            "service": {
                "id": "default",
                "label": "Pickup at location"
            },
            "original_amount": {
                "number": "0",
                "currency_code": "CZK",
                "formatted": "0,00 Kč"
            },
            "amount": {
                "number": "0",
                "currency_code": "CZK",
                "formatted": "0,00 Kč"
            },
            "description": "",
            "delivery_date": null
        }
    },

I would like to add a custom field to each shipping method.

Following this tutorial, I tried to create a computed field, like this:

function custom_module_entity_base_field_info(EntityTypeInterface $entity_type) {

  if ($entity_type->id() === 'commerce_shipment') { // also tried 'shipping_rate_option'
    $fields('tooltip') = BaseFieldDefinition::create('string')
      ->setLabel(t('tooltip'))
      ->setReadOnly(TRUE)
      ->setComputed(TRUE)
      ->setClass(FieldTooltip::class);

    return $fields;
  }

}

And my class is

/**
 * Class FieldTooltip.
 */
class FieldTooltip extends FieldItemList {

  use ComputedItemListTrait;

  /**
   * {@inheritdoc}
   */
  protected function computeValue() {
    $this->list(0) = $this->createItem(0, 'tooltip text');
  }
}

It did nothing.
Also tried to create a normalizer, but that didn’t do any change either.

Is there a way to add a field to this response?

seo – Superfast website by high server response time – It is quite baffling

My new site has near perfect score on Google PageSpeed Insights (95-100 on mobile and 98-100 on desktop) and yet Google says that it has high server response time.

I use WP Rocket caching along with Cloudflare CDN (full page caching enabled with page rules and Rocket loader enabled). I also have Redis object cache enabled along with NGINX accelerator.

The site passes all lab tests! I cannot figure out what is going wrong. The other sites hosted with the same host does not have this problem.

I asked the support and they are unsure of what is causing the issue. They said that there were some 301 redirects possibly causing the issue. I never created any redirects in the first place.

Can someone help me figuring out what is going wrong? How can a website has near perfect / perfect score, load completely in less than a second on desktop and less than 2 seconds on mobile and still have a server response time of 1.13 seconds? Please see the screenshot attached.

enter image description here

web applications – How to optimize the request time for large data response?

I have created a dashboard for rendering a list of clients into a DataTable. Below shown is the data model structure:
data_model_structure

When I had a few records in the clients schema, let’s say a thousand rows, the request time was fairly okay. It would take around of 4-5 seconds for the whole trip, from requesting to processing at backend to sending response with data and rendering it to frontend. Once the data reached to 10,000+ rows, the time it’s taking is too much. Now it takes anywhere near 17 seconds or sometimes even more. I’m using Laravel, the Eloquent ORM of this framework brings the data from the related tables (which is highly useful) but as the data is growing it’s increasing the requesting time. My question is what could be a better approach to minimize the request time? How can I decrease the time it takes to request??

reverse proxy – Incorrect Location in response header on Apache server

reverse proxy – Incorrect Location in response header on Apache server – Server Fault

Requiring an exact number of checkboxes ticked based on previous multiple choice response in Google Forms

Google Forms lets you use a validation rule like select exactly 2 checkboxes. In your scenario, the 2 will vary. The rule, however, cannot read the 2 dynamically, so the value will have to be hardcoded.

There is a way to vary the number, though:

  1. Create multiple copies of the checkbox question, with each copy using a validation rule with a different number in place of 2.
  2. Place each copy of the checkbox question in a section of its own.
  3. Modify the multiple choice question so that it uses the go to section based on answer option.

To make sure the user only ever sees one copy of the checkbox question, you would have to use the go to section based on answer again to skip any remaining checkbox sections. This may require that you add another multiple choice or dropdown question at the end of each checkbox section.

All this adds complexity to the form, and I am not sure if it is worth the effort in your use case. It may be simpler to just add text to the form to emphasize to the user that they can only tick as many checkboxes as the multiple choice indicates.

You may also want to consider using another forms package. There are many such packages out there that support writing their responses directly to Google Sheets.

Yet another option is to write your own custom HTML form and deploy it as a web app. See the Web App Demo for sample code.

Conditional validation of checkboxes based on response

I have multiple checkbox-questions that need to have exactly that amount of checked boxes as given in a multiple-choice question. So if a person chooses, 2 in the multiple choice, I want that person to choose 2 options in the following checkbox questions.

Is this possible?

multi tenant – Unable to create pluggable database on 19c using response file

I am trying to create Pluggable database using response file but it is giving me below error indicating that one of the mandatory parameters is/are missing. Although I have checked it multiple times and don’t see that any mandatory parameter is missing. Below is my response file which I am using.

 dbca -silent -createPluggableDatabase -responseFile /f01/app/oracle/dbca_pdb_creation.rsp
(INS-04008) Invalid combination of arguments passed from command line. One or more mandatory dependent arguments are not passed for the argument: -createPluggableDatabase

I am able to create the database when passing the required parameters directly in command line as below:

dbca -silent -createPluggableDatabase -sourceDB testcdb  -pdbName testpdb2 -createPDBFrom default  -pdbAdminUserName PDBADMIN  -pdbAdminPassword abcd1234

Response file

##############################################################################
##                                                                          ##
##                            DBCA response file                            ##
##                            ------------------                            ##
## Copyright(c) Oracle Corporation 1998,2019. All rights reserved.         ##
##                                                                          ##
## Specify values for the variables listed below to customize               ##
## your installation.                                                       ##
##                                                                          ##
## Each variable is associated with a comment. The comment                  ##
## can help to populate the variables with the appropriate                  ##
## values.                                                                  ##
##                                                                          ##
## IMPORTANT NOTE: This file contains plain text passwords and              ##
## should be secured to have read permission only by oracle user            ##
## or db administrator who owns this installation.                          ##
##############################################################################
#-------------------------------------------------------------------------------
# Do not change the following system generated value. 
#-------------------------------------------------------------------------------

#-----------------------------------------------------------------------------
# GENERAL section is required for all types of database creations.
#-----------------------------------------------------------------------------
(GENERAL)

#-----------------------------------------------------------------------------
# Name          : RESPONSEFILE_VERSION
# Datatype      : String
# Description   : Version of the database to create
# Valid values  : "12.1.0"
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v19.0.0

#-----------------------------------------------------------------------------
# Name          : OPERATION_TYPE
# Datatype      : String
# Description   : Type of operation
# Valid values  : "createDatabase"  "createTemplateFromDB"  "createCloneTemplate"  "deleteDatabase"  "configureDatabase"  "addInstance" (RAC-only)  "deleteInstance" (RAC-only)  "createPluggableDatabase"  "unplugDatabase"  "deletePluggableDatabase"  "configurePluggableDatabase"
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
OPERATION_TYPE = "createPluggableDatabase"

#-----------------------*** End of GENERAL section ***------------------------

#----------------------------------------------------------------------------------
# CREATEPLUGGABLEDATABASE section is used when OPERATION_TYPE is defined as "createPluggableDatabase". 
#----------------------------------------------------------------------------------
(CREATEPLUGGABLEDATABASE)
#----------------------------------------------------------------------------------
# Name          : SOURCEDB
# Datatype      : String
# Description   : The source database is the SID 
#     This database must be local and on the same ORACLE_HOME.
# Default value : none
# Mandatory     : YES
#-----------------------------------------------------------------------------
SOURCEDB = "testcdb"

#----------------------------------------------------------------------------------
# Name          : PDBNAME
# Datatype      : String
# Description   : The name of new pluggable database 
#     This pdb name must not be same as sourcedb name.
# Default value : none
# Mandatory     : YES
#-----------------------------------------------------------------------------
PDBNAME = "testpdb2"

#----------------------------------------------------------------------------------
# Name          : CREATEASCLONE
# Datatype      : Boolean
# Description   : specify true or false for PDB to be create as Clone.
#               : When "true" is passed a new PDB GUID is generated for the plugged in PDB
# Default value : true
# Mandatory     : NO
#-----------------------------------------------------------------------------
CREATEASCLONE = "TRUE"

#----------------------------------------------------------------------------------
# Name          : CREATEPDBFROM
# Datatype      : String
# Description   : specify the source of pdb to be plugged
# Valid values  : DEFAULT | FILEARCHIVE | RMANBACKUP | USINGXML
# Default value : DEFAULT
# Mandatory     : NO
#-----------------------------------------------------------------------------
CREATEPDBFROM = "DEFAULT"
 
 
#----------------------------------------------------------------------------------
# Name          : PDBADMINUSERNAME
# Datatype      : String
# Description   : PDB Administrator user name
# Default value : None
# Mandatory     : Mandatory only when creating new DEFAULT PDB
#-----------------------------------------------------------------------------
PDBADMINUSERNAME = "PDBADMIN"

#----------------------------------------------------------------------------------
# Name          : PDBADMINPASSWORD
# Datatype      : String
# Description   : PDB Administrator user password
# Default value : None
# Mandatory     : Mandatory only when creating new DEFAULT PDB
#-----------------------------------------------------------------------------
PDBADMINPASSWORD = "abcd1234"

#-----------------------*** End of createPluggableDatabase section ***------------------------

Please help.

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive Proxies-free.com New Proxy Lists Every Day Proxies123