145 questions
0
votes
2
answers
60
views
'RequestFactory::fromGlobals() cannot be called statically' error on upgrading Nette
I'm currently doing a major upgrade on a Nette based website. We have multiple custom DI extensions, custom ORM and use the Nittro UI framework. So the upgrade is quite involved.
Going from PHP 7.2 -&...
0
votes
1
answer
86
views
Which query to use: REPLACE/WHERE NOT EXISTS/NOT IN
There is a one to many relation in the database which needs to be updated.
There is a table tasks and a table users which are linked with a table task_users containing three columns: id, task_id, ...
0
votes
1
answer
53
views
Contributte Live-form-validation - prevent double submit
I am using Nette, Contributte Live-form-validation to validate my forms and Naja in web apps. I would like to prevent double submit form my ajax and non-ajax forms.
0
votes
1
answer
201
views
Check if a (internal) function / feature / command exists in MariaDB / MySQL
I use MEDIAN function in my app. When I deploy it on the production server, I get Syntax error because there is an older version of MariaDB.
Is there a way to check if a certain function exists? ...
0
votes
1
answer
308
views
Nette behind a reverse-proxied alias on nginx
I have a Nette application running on an Apache2/Debian 11 server that works fine. However, we need to hide it behind an nginx proxy with an alias.
Let's say we have a perfectly fine Apache2 ...
0
votes
1
answer
190
views
Changing the format of the URL in Nette Application
I am new to Nette.
I have the router set up as
$router->addRoute('<presenter>/<action>[/<id>]', 'Home:home:default');
In common.neon I have the mapping set to:
*: App\Modules\*\...
0
votes
1
answer
63
views
Cannot read an undeclared column 'smtp_port'
I am trying to get the Login page of my application but after putting username and password, error is being displayed
Cannot read an undeclared column 'smtp_port'
not able to figure out the reason ...
0
votes
1
answer
173
views
Redirect old URL to new URL in .htaccess
.htaccess file
# Apache configuration file (see httpd.apache.org/docs/current/mod/quickreference.html)
# disable directory listing
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule&...
0
votes
1
answer
327
views
Nette Form - set default value on text (type date) in FormFactory
I have no idea how to set, or if it is even possible to set default value on text (type date).
Here is my FormFactory:
$form->addText('category_priority', 'Prioritizovať do')
->...
0
votes
1
answer
522
views
How to autowire ( autowiring ) / get services in Nette from the di dependency injection container context
How to autowire nette services from the container, to be accessible to be used inside presenters ( controllers ) or models ,etc?
0
votes
1
answer
227
views
How to use standard , normal non pretty urls routing in framework Nette?
I want to use standard , not the pretty , nice , clean , neat urls routing in framework Nette as that way it is dependent on the apache httpd mod_rewrite module, which I don't have available , and ...
1
vote
1
answer
254
views
PHP Nette Throws Error When Someone Submits Form
I get this error whenever someone submits the form:
Fatal error: Uncaught Nette\Mail\SendException: Unable to send email.
Here is my code:
if ($form->isSubmitted()) {
$values = $form->...
0
votes
1
answer
280
views
Nette - importing naja library
I have a question. I need to make some modification to our nette application (first time working with the framework). I need to import NAJA lib via FTP and by downloading code from github. I do not ...
0
votes
1
answer
132
views
Javascript, Ajax, latte and Presenter problem. Can't use GET request on file in another directory
I have a question. I was tasked to add some function to our web application. It is build on php presenter by somebody else so it's quite difficult for me to debug as I never work with this stuff.
I am ...
1
vote
1
answer
615
views
PHP Latte - multiple block with same name
I am new to latte template engine and fiddle around with it since some days. I found a lot of nice and usefull things to make my projects easier and cleaner. But there is one thing I did not find or ...
1
vote
0
answers
109
views
PhpStorm getting rid of 1 horizontal line in settings
I`m starting to personalize my PhpStorm a bit and would love to get rid of horizontal line between PHPDoc and method while keeping the methods overall separated (with the same line)
I've been trying ...
1
vote
1
answer
726
views
Nette and flash messages
I have VPS where I run php (7.4) and nginx.
I have installed Nette and other packages by composer.
My problem is:
I can't print flash messages. In my presenter I have code $this->flashMessage("...
1
vote
1
answer
1k
views
Nette framework - Nette\Database\ResultSet implements only one way iterator
I came across a problem with foreach.
If one result is returned in the first foreach {foreach $children as $child}, then it works. As there are more, an error pops up:
Nette\Database\ResultSet ...
1
vote
2
answers
582
views
Nette Redirect and Send file in the same form
I have a problem with sending a file and redirect to new page in the same time, now it is working just two ways:
1. Sending a file via sendResponse
2. Redirect to a new page
My code after form ...
0
votes
1
answer
114
views
Nette, extract numbers from a textarea to perform a Calculation
Hello I have this issue where I want to take the input values from textarea1 which will be for example: "300pcs, 200$" on the first line and "500pcs, 400$" and so on, to perform an increase of price ...
1
vote
0
answers
67
views
Can I use tests written with Nette Tester with Jenkins
I need to make a continuous integration mechanism with some framework. The first on my mind was Jenkins but the whole project what I wanna test is written in Nette framework. So I want to use Nette ...
1
vote
1
answer
106
views
Wordpress like plugins with custom CMS in nette
We are developing CMS based in nette for our company and we have to design it to be plugin based for our clients. Something like wordpress but custom for our needs. Is there some easy way in nette to ...
0
votes
1
answer
2k
views
How and where to include CSS and JS file in NETTE framework?
I came across a problem to add external files to template in Nette when I used a traditional way of adding external files. Either I added those links to incorrect file (template is not the place where ...
0
votes
2
answers
551
views
Can you do math operations with inline style values or use SASS to do math operations with inline CSS?
Due to my php code (nette framework) being dynamic, I use some inline styling.
<div id="parent" style="height:{$place->getHeight()}px; ">
This creates a problem for me as I need the ...
0
votes
2
answers
182
views
Nette getHttpData include of unchecked checkboxes
can somehow unchecked checkboxes be included when I have a form with a dynamic number of checkboxes (name='golyPenalta[]') and in submit I get them using $form->getHttpData($form::DATA_TEXT, "...