OS Ticket Open Ticket CSRF Token Dump Error - osticket

When i open new ticket in OS Ticket System, after ticket submission dump the array in the top of the page.
Error shown below.
Click to show image
Update
Error in text form:
Array ( [CSRFToken] => a56c08a9f49842de2ab3fc8e02d13ca2921d5f49 [a] => open [695fbbb799cdbbc2] => usman.saif22#gmail.com [ecf6c52d42557ef0] => M Usman [fec356fce5ea2de9] => [fec356fce5ea2de9-ext] => [topicId] => 2 [83163d48527225db] => Testing [message] => Testing [draft_id] => [emailId] => 0 [deptId] => 0 [cannedattachments] => Array ( ) )
This error occur when open new ticket, even ticket is successfully opened. But, shown this error when user open ticket.

Related

Oracle APEX print with API

I need to export a report saving it in PDF format. I created a button that submits to a new page, which performs the following piece of code:
APEX_UTIL.DOWNLOAD_PRINT_DOCUMENT (
p_file_name => 'myreport123',
p_content_disposition => 'attachment',
p_application_id => :APP_ID,
p_report_query_name => 'MY_REPORT_QUERY',
p_report_layout_name => 'MY_REPORT_LAYOUT',
p_report_layout_type => 'xsl-fo',
p_document_format => 'pdf'
)
;
MY_REPORT_QUERY and MY_REPORT_LAYOUT are defined in the shared components. When I press the button, it downloads a pdf file, but it looks empty or corrupted.
What could be wrong? Do I need to specify the print server? And what about the field APP_ID?
I can confirm that both the query and layout work when I download the report by directly redirecting the page to the url of MY_REPORT_QUERY.
Thanks in advance and best regards.

fopen(C:\xampp\htdocs\bluway\storage\app\public\profilePhotos\avatar.jpg): failed to open stream. No such file or directory

I really need help please. I have been on this for over 2 hours and I keep getting the same error.
if(request()->hasFile(‘profile_image’)){ $fullFileName = request()->file(‘profile_image’)
->getClientOriginalName();
$path = request()->file(‘profile_image’)->storeAs(‘profilePhotos’, $fullFileName);
}
Now in the create method:
$user = User::create([
‘userId’ => request(‘userId’),
‘email’ => request(‘email’),
‘name’ => request(‘name’),
‘password’ => Hash::make(request(‘password’)),
‘profile_image’ => $fullFileName,
]);
I keep getting the error below. Someone please help...thanks. Plus I have created Storage link multiple times and keep deleting and recreating.
fopen(C:\xampp\htdocs\bluway\storage\app\public\profilePhotos\avatar.jpg): failed to open stream. No such file or directory

how to download office 365 mail attachment file using laravel/PHP

I'm using Microsoft graph API for fetching office 365 mails. I got all the emails from the API call but I don't know how to save an attachment from the message object. How do I save contentBytes to file?
Microsoft\Graph\Model\Message Object
(
[_propDict:protected] => Array
(
[#odata.context] => https://graph.microsoft.com/v1.0/$metada
[#odata.type] => #microsoft.graph.fileAttachment
[#odata.mediaContentType] => application/pdf
[id] => AAMkADM4MDYwMDkxLWRmN2UtNDJmMC04NDEwLTljZmQ2N2I4Zjc5NABGAAAAAAAix7kDZj2fRq
[lastModifiedDateTime] => 2016-04-18T09:44:53Z
[name] => 1 ) Muhammad Abdullah New.pdf
[contentType] => application/pdf
[size] => 104767
isInline] =>
[contentId] => C#$F3#eurprd06.prod.outlook.com
[contentLocation] =>
[contentBytes] => JVBERi0xLjUNJeLjz9MNyuFJFtfTffYSTIgCjUwNSAwIG9iag08PC9MaW
)
)
Finally i got a solution.We get base64_encoded contentBytes from the Graph API, we need to convert contentBytes to base64_decode format.so you have to write base64_decoded content to a file.
$content=base64_decode($attachment_data->getcontentBytes(),true);
file_put_contents(public_path(). "/sample/".$attachment_data->getname(),$content);
// download code

Calling an XML report by clicking a button on Oracle form and downloading the output

I have an xml report defined which produces a pdf output when submitted from SRS window.
Now the same report needs to be called from form by clicking a button.
The report should run and the output must be available there itself as a downloadable pdf file.
Thanks
This can be done following two steps:
1- First you have to attach layout to your concurrent request using fnd_request.add_layout.
2- Then you have to submit the concurrent request using fnd_request.submit_request.
Your code goes as follows:
--Setting Layout for the Request
l_layout := apps.fnd_request.add_layout(
template_appl_name => 'XXCUST',
template_code => 'XXEMP',
template_language => 'en',
template_territory => 'US',
output_format => 'EXCEL');
--
--Submitting Concurrent Request
--
l_request_id := fnd_request.submit_request (
application => 'XXCUST',
program => 'XXEMP',
description => 'XXTest Employee Details',
start_time => sysdate,
sub_request => FALSE,
argument1 => 'Smith');
to get information about templates, you can use following SQL:
SELECT * FROM xdo_templates_b
WHERE template_code = ‘FNDCPPGD_XML’;
SELECT * FROM xdo_templates_tl
WHERE template_code = ‘FNDCPPGD_XML’;

How to translate upload errors on CodeIgniter

I am using CodeIgniter to upload some files through a form. I know how to translate "regular" form errors (required, valid_email, etc) but I don't know how to do it with file errors (file is not allowed, file is too big, etc).
Which keys should I use in
$this->form_validation->set_message('KEY', 'TRANSLATION');
?
Thanks
METHOD 1
By default, language files are typically stored in system/language directory. Alternately you can create a file called upload_lang.php inside your application/language folder and store them there.
$lang['upload_userfile_not_set'] = "Unable to find a post variable called userfile.";
$lang['upload_file_exceeds_limit'] = "The uploaded file exceeds the maximum allowed size in your PHP configuration file.";
$lang['upload_file_exceeds_form_limit'] = "The uploaded file exceeds the maximum size allowed by the submission form.";
$lang['upload_file_partial'] = "The file was only partially uploaded.";
$lang['upload_no_temp_directory'] = "The temporary folder is missing.";
$lang['upload_unable_to_write_file'] = "The file could not be written to disk.";
$lang['upload_stopped_by_extension'] = "The file upload was stopped by extension.";
$lang['upload_no_file_selected'] = "You did not select a file to upload.";
$lang['upload_invalid_filetype'] = "The filetype you are attempting to upload is not allowed.";
$lang['upload_invalid_filesize'] = "The file you are attempting to upload is larger than the permitted size.";
$lang['upload_invalid_dimensions'] = "The image you are attempting to upload exceedes the maximum height or width.";
$lang['upload_destination_error'] = "A problem was encountered while attempting to move the uploaded file to the final destination.";
$lang['upload_no_filepath'] = "The upload path does not appear to be valid.";
$lang['upload_no_file_types'] = "You have not specified any allowed file types.";
$lang['upload_bad_filename'] = "The file name you submitted already exists on the server.";
$lang['upload_not_writable'] = "The upload destination folder does not appear to be writable.";
METHOD 2
You can use Flashdata after upload process.
if ($this->upload->do_upload())
{
$this->session->set_flashdata('success', 'Yep! Upload complete');
redirect('go_back_home');
}
else
{
$this->session->set_flashdata('error', 'Uh, upload not complete! The problem is..'); // Manually check
redirect('go_back_form');
}
You can also check the problem with $this->upload->data(). This is a helper function that returns an array containing all of the data related to the file you uploaded. Here is the array prototype :
Array
(
[file_name] => mypic.jpg
[file_type] => image/jpeg
[file_path] => /path/to/your/upload/
[full_path] => /path/to/your/upload/jpg.jpg
[raw_name] => mypic
[orig_name] => mypic.jpg
[client_name] => mypic.jpg
[file_ext] => .jpg
[file_size] => 22.2
[is_image] => 1
[image_width] => 800
[image_height] => 600
[image_type] => jpeg
[image_size_str] => width="800" height="200"
)
Try this:
lang:your_translation_key
A real example:
$this->form_validation->set_rules('name', 'lang:web_name', 'required|trim|xss_clean|min_length[2]|max_length[100]');

Resources