jPanel: Start Publishing not Obeyed

  • rholzler
  • rholzler's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 8 months ago - 3 years 8 months ago #659 by rholzler
rholzler created the topic: jPanel: Start Publishing not Obeyed
Modules with future Start Publishing dates are being included in the jPanel so the Start Publishing date is being ignored.

How to Replicate:
  • Create a module and set the Start Publishing to 12/01/2018 00:00:00.
  • Assign it to the position used by jPanel.
  • View a page on the site that displays the jPanel module.

Expected Result:
The new module should NOT be seen in jPanel on the front end of the site because today's date is not yet 12/01/2018 00:00:00.

Actual Result:
The module content is displayed withing the jPanel on the front end.
Attachments:
Last Edit: 3 years 8 months ago by rholzler. Reason: Added extension to title to make it easier to understand when viewing in the forum index.

Please Log in or Create an account to join the conversation.

  • rholzler
  • rholzler's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 4 months ago #706 by rholzler
rholzler replied the topic: jPanel: Start & Finish Publishing Dates not Obeyed
We have found that jPanel does not obey the Finish Publishing data set in modules either.

Modules assigned to the position set in the "Load modules from what module position?" field will be displayed regardless of the start or finishing dates.

This is a bug that really needs to be fixed.

Please Log in or Create an account to join the conversation.

  • rholzler
  • rholzler's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 10 months ago #734 by rholzler
rholzler replied the topic: jPanel: Start & Finish Publishing Dates not Obeyed
SOLUTION: Replace line 27 in the helper.php with the code below that filters based on publish_up and publish_down dates.

FILE: helper.php
LINE: 27
//		$sql = "SELECT * FROM #__modules WHERE position = '".$pos."' AND published = 1 ORDER BY ordering"; 
		$sql = "SELECT * FROM #__modules 
		WHERE (position = '".$pos."' AND published = 1 and publish_up ='0000-00-00 00:00:00' ) 
		OR (position = '".$pos."' AND published = 1 AND publish_up <= CURDATE() AND publish_down >= CURDATE())
		OR (position = '".$pos."' AND published = 1 AND publish_up <= CURDATE() AND publish_down = '0000-00-00 00:00:00') ORDER BY ordering";

Please Log in or Create an account to join the conversation.

Fork me on GitHub
Cookies make it easier for us to provide you with our services. With the usage of our services you permit us to use cookies.
More information Ok