Lỗi server url parameter is missing or wrong là gì

MessageAn error occurred while generating the pdf for <url>: The AbsoluteURL mandatory parameter is missing in the request.

Environment InformationeSpaceVer: Id=13890, PubId=0, CompiledWith=11.15.0.34858RequestUrl: <redacted> (Method: POST)AppDomain: /LM/W3SVC/1/ROOT/<redacted> -671-133081490659914116FilePath: E:\OutSystems\Platform Server\running\<redacted> .1778516987\ClientIp: 10.177.20.9Locale: en-USDateFormat: dd-MM-yyyyPID: 5840 ('w3wp', Started='9/14/2022 6:21:00 PM', Priv=3042Mb, Virt=2114912Mb)TID: 785Thread Name:.NET: 4.0.30319.42000

StackAn error occurred while generating the pdf for <url>: The AbsoluteURL mandatory parameter is missing in the request. at ssUltimatePDF.Actions.ActionPrintPDF_Proxy(HeContext heContext, String inParamURL, String inParamTemporaryFolder, String inParamProduct, String inParamRevision, RCViewportRecord inParamViewport, STUserEnvironmentStructure inParamEnvironment, RCPaperRecord inParamPaper, Byte[]& outParamPDF) at ssUltimatePDF.Actions.ActionPrintToPDF_Advanced(HeContext heContext, String inParamURL, STUserEnvironmentStructure inParamEnvironment, String inParamPaperSize, String inParamMarginSize, Byte[]& outParamPDF)

we are using the PrintToPDF_Advanced action:

So i'm not really sure what is going wrong here. It seems that the error comes from the UltimatePDF_Utils Extension.

I guess if you've stumbled upon this post it means that you're having some trouble with the Shopig checkout or add to cart process and you're seeing this error

Required parameter missing or invalid: id

Generally this error can show for a few different reasons:

  1. You're trying the checkout to the wrong address
  2. You're trying to add to cart, but again - to the wrong address
  3. You're trying to add to cart and you've not got a form element with a product ID

In all cases check your code and make sure that no only are you posting to the correct address but you're also sending along the required data as well.

Composer 8 buttons in Salesforce Lightning will produce an id parameter is missing error message when an additional question mark is included in the button URL. This most commonly happens when you use ?pv0= to pass a non-standard field value into the filter of your data source.

For example, the following would cause an error in Lightning: &QueryId=a0441000002PxvVAAS?pv0={!Opportunity.AccountId}

Tip

The example above only contains one question mark. Isn't the problem when you have more than one question mark? Yes! Composer buttons also have a question mark in the base URL (which is the first few lines), making the question mark in the above example the second.

What is the appropriated status code to give when this parameter is missing from the request? 400 is the one? or should I respond with a 404?

I would argue that is appropriate

The 404 (Not Found) status code indicates that the origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

The fact that your routing implementation happens to send /search and /search?q=ok to the same handler does not mean that they are the same resource. /search identifies a resource, there's no current representation available for it, so you send a response back to the consumer explaining the problem, and put 404 in the meta data.

The big hint in the spec is this one:

A 404 response is cacheable by default

That lets us inform the client (and any intermediary components) know that this response can be reused.

It's a useful property, and it doesn't apply (out of the box) to 400 Bad Request

Heuristic: your web api should act like a document store. If you ask a document store to give you a document, but you spell the key wrong, what do you get? Some flavor of KeyNotFound exception. Same thing you would get if you asked a web server for a document in your home directory, but your spelled the file name incorrectly.

When adding an item to the cart, you may have encountered the error Parameter Missing or Invalid: Required parameter missing or invalid. This error occurs when you don't submit a variant ID or quantity amount with your Add to Cart form.

There are a few possible reasons for this:

  • You might have badly-formed HTML in your customized template. You can check your HTML by submitting your code to the W3C Validator.
  • You might have tried to hide the default option for a product that has only one variant by removing the dropdown menu or single radio button. You must replace whatever you have removed with a hidden field that will pass the variant ID of the first variant to Shopify. If you have any trouble with this, post a question in the Shopify Community forums.
  • You might use radio buttons for product variants in your customized theme, but there is no button checked by default. You have to select the first radio button in your HTML using selected="selected". If your customer does not select a variant, and there is no variant selected by default, no variant ID is submitted with the form.

If you are unable to fix this error using these methods, you can roll back your product.liquid template to an earlier version.