WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#6442 closed defect (bug) (fixed)

Widgets in sidebar not showing under design/widgets in dashboard of wc2 2.5

Reported by: Ainsaree Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.7
Component: Widgets Keywords: has-patch tested commit
Focuses: Cc:

Description

I have widgetize anything as a plugin. Under Design/Widgets you can list what widgets are available, and which are being used and where. As my widgets are shown in each sidebar (1 and 2). Selection sidebar 1 displays all the widgets correctly that are being used, but selecting sidebar 2 in the same drop down box displays the following error : %BEG_OF_TITLE%Calendar%END_OF_TITLE%

Attachments (4)

sidebar2.gif (86.1 KB) - added by Ainsaree 7 years ago.
screenshot of error
sidebar.gif (86.3 KB) - added by Ainsaree 7 years ago.
sidebar 1 - works without error
screen-capture.png (211.7 KB) - added by Denis-de-Bernardy 6 years ago.
6442.diff (899 bytes) - added by Denis-de-Bernardy 6 years ago.

Download all attachments as: .zip

Change History (16)

@Ainsaree7 years ago

screenshot of error

@Ainsaree7 years ago

sidebar 1 - works without error

comment:1 @Viper007Bond7 years ago

You sure this isn't just the widget's fault? Does it happen with the plugin disabled?

comment:2 @Denis-de-Bernardy7 years ago

Nope, the calendar widget is very broken, and here's a fix for that particular widget:

http://trac.wordpress.org/ticket/6500#comment:2

but that merely fixes the symptom, not the cause.

comment:3 @ryan7 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

comment:4 @mrmist7 years ago

  • Milestone 2.9 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

worksforme in 2.7

Re-open with steps if still reproducable.

comment:5 @Denis-de-Bernardy6 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Still happens...

Add the WP-Calendar to Kubrick's sidebar. Click save.

comment:6 @Denis-de-Bernardy6 years ago

  • Version changed from 2.5 to 2.7

comment:7 @mrmist6 years ago

I'm still not seeing it (against trunk) in either Linux or IIS based sites.

What sort of hosting is it failing in? Mine are php 5 based does it fail in php 4?

comment:8 @Denis-de-Bernardy6 years ago

I've nailed down steps to reproduce:

  • create a new 2.7 install
  • delete the initial post
  • insert the calendar widget

@Denis-de-Bernardy6 years ago

comment:9 @Denis-de-Bernardy6 years ago

  • Keywords has-patch tested added

Attached patch is against my local SVN, but it should work fine. It:

  • Fixes the issue by moving the call to ob_start() to after the check
  • Sets the cache when no posts are present
  • Optimizes the query that checks if posts are present

comment:10 @Denis-de-Bernardy6 years ago

  • Keywords commit added

comment:11 @ryan6 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [10708]) Fix calendar widget when there are no posts. Optimize query. Props Denis-de-Bernardy. fixes #6442

comment:12 @ryan6 years ago

  • Component changed from General to Widgets
  • Milestone set to 2.8
Note: See TracTickets for help on using tickets.