Skip to content

[Bug]: Searching records will throw error #1224

@stanjeptha

Description

@stanjeptha

Describe the problem

If you try to search for records it will throw and web error:
An error occurred while processing the request.

Steps to reproduce

  1. Go to Search
  2. Write and press enter to search for a RR
  3. Error is displayed

Poweradmin version

4.0.10

Database

SQLite

Additional information (optional)

The patch below is for 4.0.4. Seems it was not fixed in 4.0.10.

--- lib/Domain/Repository/RecordRepository.php.orig     2025-11-03 09:24:52.000000001 +0200
+++ lib/Domain/Repository/RecordRepository.php  2025-12-22 10:15:59.124330619 +0200
@@ -465,9 +465,9 @@
         \$query .= " WHERE \$records_table.domain_id = :zone_id AND \$records_table.type IS NOT NULL AND \$records_table.type != ''" .
                 \$search_condition . \$type_condition . \$content_condition;

         // Sorting and limits
-        \$query .= " ORDER BY \$sort_by \$sort_direction LIMIT :row_amount OFFSET :row_start";
+        \$query .= " ORDER BY \$records_table.\$sort_by \$sort_direction LIMIT :row_amount OFFSET :row_start";

         \$stmt = \$this->db->prepare(\$query);

         // Bind parameters - use PDO::PARAM_INT for LIMIT and OFFSET

Metadata

Metadata

Assignees

Labels

coreCore FeaturesdnsDNS Managementsize: XSExtra small effort

Type

No fields configured for Bug.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions