惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cyberwarzone
Cyberwarzone
Vercel News
Vercel News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
aimingoo的专栏
aimingoo的专栏
B
Blog RSS Feed
A
About on SuperTechFans
T
The Blog of Author Tim Ferriss
爱范儿
爱范儿
腾讯CDC
S
SegmentFault 最新的问题
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
The Hacker News
The Hacker News
J
Java Code Geeks
大猫的无限游戏
大猫的无限游戏
B
Blog
IT之家
IT之家
Spread Privacy
Spread Privacy
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
Cisco Blogs
Recent Announcements
Recent Announcements
H
Hacker News: Front Page
AI
AI
I
InfoQ
H
Heimdal Security Blog
T
Threatpost
Cisco Talos Blog
Cisco Talos Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
I
Intezer
W
WeLiveSecurity
SecWiki News
SecWiki News
MongoDB | Blog
MongoDB | Blog
宝玉的分享
宝玉的分享
博客园 - 【当耐特】
云风的 BLOG
云风的 BLOG
T
Threat Research - Cisco Blogs
V2EX - 技术
V2EX - 技术
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
O
OpenAI News
阮一峰的网络日志
阮一峰的网络日志
T
Troy Hunt's Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
雷峰网
雷峰网
T
Tor Project blog
有赞技术团队
有赞技术团队
Schneier on Security
Schneier on Security
Last Week in AI
Last Week in AI

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
I Fixed a Broken onOffice WordPress Integration – Here's What 3 Agencies Missed
Joshua · 2026-06-02 · via DEV Community

HR Hanse Holding manages properties in Hamburg and runs their portfolio on onOffice enterprise – the market-leading real estate CRM in Germany (30,000+ users, 6,000+ companies). The properties needed to appear on their WordPress website. Custom design, filters, working detail pages.

Three agencies had tried before me. None succeeded. Zero properties on the website. Detail pages returning 404. Default plugin layout that didn't match the brand.

The typical diagnosis: "The plugin doesn't work."

In reality, the plugin works fine. The configuration around it was broken.


The Starting Point: Zero Listings

The onOffice plugin for WordPress was installed, the API key entered – but not a single property showed up. Clicking a detail page link returned a 404. The standard layout didn't match the corporate design anyway.

Two root causes. Both classic. Both missed by the previous agencies.

Problem 1: API Permissions (The Silent Killer)

The API user in onOffice had "Read properties" set to "own only" instead of "all".

Small toggle, massive impact: the API only returns properties personally assigned to the API user. A technical API account typically has zero properties assigned – so the API returns an empty list.

Here's the nasty part: the API doesn't return an error.

// API response with wrong permissions ("own only"):
{
    "status": { "code": 200 },
    "data": {
        "records": [],        // <-- empty, NOT an error
        "countabsolute": 0
    }
}

// API response with correct permissions ("all"):
{
    "status": { "code": 200 },
    "data": {
        "records": [ ... ],   // <-- 22 properties
        "countabsolute": 22
    }
}

Enter fullscreen mode Exit fullscreen mode

Status 200, empty list. If you don't know where the toggle is in the onOffice admin panel, you'll search for the bug in the plugin code forever.

Fix: onOffice admin → API settings → API user → Set "Read properties" to "all".

Problem 2: Permalink Structure Breaks Routing

The onOffice plugin registers custom rewrite rules for detail pages. These rules only work when WordPress permalinks are set to "Post name" (/%postname%/).

With any other setting – "Plain", "Day and name", "Numeric" – the plugin's routing logic simply doesn't kick in. Detail page links lead to 404.

Quick diagnostic: If the list view shows properties but clicking on individual listings returns a 404 → go to Settings → Permalinks → select "Post name" → click "Save Changes" once (even if nothing appears to change). WordPress regenerates the rewrite rules, and the detail pages start working.

Once both problems were fixed: 22 properties in the list view, detail pages reachable. But the default design was still generic – and that's where the real work started.


Custom Templates in templates.dist/

Here's something most WordPress developers don't know: the onOffice plugin loads its templates from a templates.dist/ directory inside the plugin folder. You place your custom template files there alongside the defaults and select them in the plugin settings.

The catch: during a plugin update, the entire plugin folder gets replaced – including templates.dist/. Your custom templates are gone.

That's exactly what happened with the previous agencies. They either:

  • Lost their templates on every update, or
  • Worked with CSS overrides that broke whenever the plugin's HTML structure changed

The clean approach: build custom templates and secure them with a recovery mechanism.

Project Structure

wp-content/plugins/
├── onoffice-for-wp-websites/          ← main plugin (don't touch)
│   └── templates.dist/
│       ├── estate/
│       │   ├── default_list.php
│       │   ├── default_detail.php
│       │   ├── cardgrid.php            ← custom list view
│       │   └── custom_detail.php       ← custom detail page
│       └── onoffice-style.css          ← custom stylesheet
│
└── onoffice-template-guard/            ← recovery plugin
    ├── onoffice-template-guard.php
    └── backup/                         ← protected backup copies
        └── templates.dist/
            └── ...

Enter fullscreen mode Exit fullscreen mode

What the Custom Templates Do

List view (cardgrid.php): 3-column card grid (responsive → 2 → 1 column) with:

  • Main image with hover zoom
  • Marketing type badge (e.g. "BUY" / "RENT")
  • Property title, meta line, fact boxes (rooms, area)
  • Price display and detail link
  • Location filter via TomSelect multiselect
  • Pagination via paginate_links()

Custom list view with card grid and location filter
3-column card grid with location filter and pagination on verwaltung-hh.com

Detail page (custom_detail.php): Full exposé presentation with:

  • Image gallery with lightbox (arrow navigation, keyboard support, image counter)
  • Dynamic highlight badges via getFieldLabel() (balcony, elevator, parking, etc.)
  • Key data from onOffice field configuration
  • Property description with clean typography
  • OpenStreetMap via Leaflet.js (more on GDPR below)
  • Sticky contact person sidebar (avatar, phone, email)

Custom detail page with gallery and key data
Detail page: image gallery, key data, OpenStreetMap map, contact person box


The Template Guard: Surviving Plugin Updates

Custom templates in templates.dist/ work great – until the next plugin update wipes them. The solution: a custom WordPress plugin that automatically restores them.

The onOffice Template Guard hooks into upgrader_process_complete – it only fires when WordPress performs a plugin update. After every onOffice update, it checks whether the custom files are still present and restores them from a protected backup if needed.

// Simplified recovery logic (onOffice Template Guard)
add_action('upgrader_process_complete', function($upgrader, $options) {
    if ($options['type'] !== 'plugin') return;

    $templates = [
        'templates.dist/estate/cardgrid.php',
        'templates.dist/estate/custom_detail.php',
        'templates.dist/onoffice-style.css',
    ];

    $plugin_dir = WP_PLUGIN_DIR . '/onoffice-for-wp-websites/';
    $backup_dir = WP_PLUGIN_DIR . '/onoffice-template-guard/backup/';

    foreach ($templates as $tpl) {
        if (!file_exists($plugin_dir . $tpl)) {
            // Template missing → restore from backup
            wp_mkdir_p(dirname($plugin_dir . $tpl));
            @copy($backup_dir . $tpl, $plugin_dir . $tpl);
        }
    }
}, 10, 2);

Enter fullscreen mode Exit fullscreen mode

In the WordPress admin there's a status page under Tools → onOffice Template Guard: which templates are present, whether the backup is intact, and a manual restore button.

The plugin doesn't run on every page load – only after updates. Zero performance overhead.

On maintainability: The Template Guard isn't a technical highlight – and that's the point. A team maintaining this site two years from now will understand what it does in thirty seconds. The admin page shows green or red. The hook only fires after updates. The backup lives in a fixed location. Sometimes the best solution is the most boring one.


GDPR: OpenStreetMap Instead of Google Maps

Property pages without a map are like exposés without an address. Google Maps is the default, but has GDPR implications in the EU: on load, IP addresses and browser data are sent to Google. This requires cookie consent, and many users decline – so the map is hidden behind a "Load external content" overlay.

The alternative: Leaflet.js with OpenStreetMap tiles.

  • 42 KB gzipped
  • Open source
  • OpenStreetMap servers don't process personal data under GDPR
  • Map is immediately visible – no consent banner, no overlay
  • Coordinates come directly from the onOffice dataset (no extra geocoding needed)

For users who need navigation, there's an "Open in Google Maps" button that passes coordinates as an external link – without embedding Google Maps on the page itself.


Results

After the integration:

  • 22 properties live, fully synchronised from onOffice
  • List view: 3-column card grid with location filter and pagination
  • Detail pages: Gallery, key data, OpenStreetMap map, contact person
  • Update-safe: Template Guard auto-restores after plugin updates
  • GDPR-compliant: No Google Maps, no external trackers
  • Responsive: Mobile-optimised across all breakpoints

Live result: verwaltung-hh.com


Key Takeaways

If you're working on an onOffice WordPress integration:

  1. When "the plugin doesn't work" → check API configuration first. The permission toggle between "own only" and "all" is the #1 cause of empty listings. The API returns 200 with an empty array – no error message to guide you.

  2. Permalink structure is a prerequisite, not a detail. "Post name" (/%postname%/) is required for the plugin's routing to work. Everything else → 404 on detail pages.

  3. Custom templates go in templates.dist/ – this is the intended way to build custom designs. Yet most developers don't know about it and resort to fragile CSS overrides.

  4. Protect your templates with upgrader_process_complete. It sounds like overkill until the next update wipes your work.

  5. OpenStreetMap + Leaflet.js is a drop-in Google Maps replacement that eliminates GDPR complexity entirely.