Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

problem downloading/opening files.

Questions related to customising nuBuilder Forte with JavaScript or PHP.
jameslast29
Posts: 16
Joined: Fri Dec 20, 2024 11:40 am
Been thanked: 1 time

Re: problem downloading/opening files.

Unread post by jameslast29 »

Hello,

we have this issue in 2 Nubuilders now.

Owner of /var/www/html/vrijwilligers:
drwxr-xr-x 7 www-data www-data 4096 Jan 17 15:20 vrijwilligers

What I'm seeing in Nubuilder:


Via ctrl-shift-d is see EM: error in NuRunSuery ( when I click on that nothing appears )

Many thanks for any advise.
Greetings, j.
jameslast29
Posts: 16
Joined: Fri Dec 20, 2024 11:40 am
Been thanked: 1 time

Re: problem downloading/opening files.

Unread post by jameslast29 »

Hello,

we see these additional EM:

Uncaught SyntaxError: Failed to execute 'querySelector' on 'Document': '#1' is not a valid selector.
at n.update (ctxmenu.min.js:1:4863)
at n.update (ctxmenu.min.js:1:4757)
at HTMLDivElement.<anonymous> (nuadmin.js:960:13)
at Function.each (jquery-3.7.1.min.js:2:3129)
at ce.each (jquery-3.7.1.min.js:2:1594)
at nuContextMenuUpdate (nuadmin.js:950:14)
at nuBuildForm (nuform.js:234:3)
at Object.successCallback (nuajax.js:132:4)
at c (jquery-3.7.1.min.js:2:25304)
at Object.fireWith [as resolveWith] (jquery-3.7.1.min.js:2:26053)

Hope this helps.
Greetings, j.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: problem downloading/opening files.

Unread post by kev1n »

jameslast29
Posts: 16
Joined: Fri Dec 20, 2024 11:40 am
Been thanked: 1 time

Re: problem downloading/opening files.

Unread post by jameslast29 »

Hello,

I downloaded and installed that.
See attachement for version info.

The issue persists, nothing changed.

greetings, j.
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: problem downloading/opening files.

Unread post by kev1n »

Is it possible to create a Minimal Reproducible Example (MRE) that includes all necessary tables and forms, ready for testing?

Since you're using custom upload and download code, reconstructing the form and setting up a test environment is quite time-consuming. Having a complete MRE would make testing much easier.

For example, you could create a fresh nuBuilder instance, integrate your forms, dump the database, and include your upload/download code in a ZIP file.
jameslast29
Posts: 16
Joined: Fri Dec 20, 2024 11:40 am
Been thanked: 1 time

Re: problem downloading/opening files.

Unread post by jameslast29 »

Hello,
is this useful? See attachement.

Greetings, j.
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: problem downloading/opening files.

Unread post by kev1n »

Object names that consist solely of numbers may cause errors. Replace them with more descriptive and meaningful names.
You do not have the required permissions to view the files attached to this post.
steven
Posts: 369
Joined: Mon Jun 15, 2009 10:03 am
Has thanked: 52 times
Been thanked: 52 times

Re: problem downloading/opening files.

Unread post by steven »

jameslast20,

The problem kev1n mentioned is what is explained in your original error.

Uncaught SyntaxError: Failed to execute 'querySelector' on 'Document': '#1' is not a valid selector.


Steven
A short post is a good post.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: problem downloading/opening files.

Unread post by kev1n »

I identified some additional issues.

1.
The Browse Form "Agressiemelding" is displaying an error.
This occurs because certain functions are being called in the Custom Code section under "Browse & Edit" instead of the "Edit" section.
Agressiemelding_browse_error.png

2. To apply the style only to the specific <img> element with id="view_image", modify the Code like this (object "view_image"):

Code: Select all

<style>
#view_image {
    width: 1200px;
    max-width: 1200px;
    max-height: 500px;
}
</style>

<img 
  id="view_image" 
  style="border: grey 1px solid;"
>
Otherwise the dimensions of all images will change. (For example, in the Object Properties dialog, the "X" (close dialog) appears very large.

3. Then, the column/object bijlage is set to readonly in the subform Bijlage. That's why the hyperlink is not clickable at first
You do not have the required permissions to view the files attached to this post.
jameslast29
Posts: 16
Joined: Fri Dec 20, 2024 11:40 am
Been thanked: 1 time

Re: problem downloading/opening files.

Unread post by jameslast29 »

Hello,

thank you, that solved it.
We can now upload/download files.

Greetings, j.
Post Reply