Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug]: Crop's submit button not submitting #2373

Closed
1 task done
omar-ahmed42 opened this issue Dec 2, 2024 · 1 comment · Fixed by #2374
Closed
1 task done

[Bug]: Crop's submit button not submitting #2373

omar-ahmed42 opened this issue Dec 2, 2024 · 1 comment · Fixed by #2374

Comments

@omar-ahmed42
Copy link
Contributor

Installation Method

None

The Problem

Upon clicking on "Submit" in Crop PDF's page, nothing gets submitted and the following error takes place in the console:

image

How to reproduce:

  1. Go to /crop
  2. Upload a file
  3. Click submit

Version of Stirling-PDF

0.35.0

Last Working Version of Stirling-PDF

No response

Page Where the Problem Occurred

/crop

Docker Configuration

No response

Relevant Log Output

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'textContent')
    at HTMLFormElement.<anonymous> (downloader.js:39:47)
    at HTMLFormElement.dispatch (jquery.min.js:2:43064)
    at y.handle (jquery.min.js:2:41048)

Additional Information

No response

Browsers Affected

Firefox, Microsoft Edge

No Duplicate of the Issue

  • I have verified that there are no existing issues raised related to my problem.
Copy link

dosubot bot commented Dec 2, 2024

The error you're encountering, "TypeError: Cannot read properties of null (reading 'textContent')", suggests that the script is trying to access a DOM element that doesn't exist or hasn't been loaded yet. This issue is occurring in the downloader.js file at line 39.

To address this, you should check the following:

  1. Ensure the Element Exists: Verify that the element you're trying to access with textContent is present in the DOM when the script runs. It might be missing or not yet rendered at the time the script executes.

  2. Check the Selector: Make sure the selector used to find the element is correct and matches the element's ID, class, or tag in the HTML.

  3. Script Execution Timing: Ensure that the script runs after the DOM is fully loaded. You can wrap your JavaScript code in a DOMContentLoaded event listener to ensure it executes at the right time.

  4. Debugging: Use browser developer tools to inspect the element and ensure it is present and correctly selected by your script.

If these steps don't resolve the issue, you might need to review the specific line in downloader.js to understand what element is being accessed and why it might be null.

To continue talking to Dosu, mention @dosu.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant