Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Banner Finish Publishing field date and time issue #11969

Closed
JamalTailored opened this issue Sep 7, 2016 · 27 comments
Closed

Banner Finish Publishing field date and time issue #11969

JamalTailored opened this issue Sep 7, 2016 · 27 comments

Comments

@JamalTailored
Copy link

JamalTailored commented Sep 7, 2016

Steps to reproduce the issue

  1. Create banner with image and select Publishing tab
  2. Set past time(less then current time) in Finish Publishing field and save banner
  3. Go to the Extensions -> Modules menu.
  4. Click on New button, select "Banners" from the selection list
  5. You will be redirected to the module detail page
  6. You need to write module name and select Banner[banner] position (according to template) and save module
  7. Go to site side

Expected result

if admin selected a past time (less then current time)in Finish Publishing field then banner should not be displayed.

Actual result

Getting following error :

"jos-Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3 SQL=UPDATE #__banners SET impmade = (impmade + 1) WHERE id IN ()"

System information (as much as possible)

PHP Version 5.5.9-1ubuntu4
Joomla! Version Joomla! 3.6.3-dev Development [ Noether ] 5-August-2016 00:32 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT

Additional comments

screen shot 2016-09-07 at 07 12 54

@brianteeman
Copy link
Contributor

Pretty sure you did not mean to tag this with MS SQL


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11969.

@brianteeman
Copy link
Contributor

How did you do step 2 - I always get
Error
Save failed with the following error: Item start publishing date must be before finish publishing date

@JamalTailored
Copy link
Author

I have manually edited time in past.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11969.

@brianteeman
Copy link
Contributor

OK so having manually set the banner to be expired and then displaying the banners on the front end I can not replicate your issue and get the expected result you identified.

Please can you retest and confirm that you can replicate this with one of the default templates and on a clean install of the latest staging release


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11969.

@PhilETaylor

This comment was marked as abuse.

@PhilETaylor

This comment was marked as abuse.

@peterwouda
Copy link

Same problem here, exept in my case I don't use banners and then the same SQL-error appears. But after adding a dummy-banner the error is gone. Deleting the banner causes the error again.

@PhilETaylor

This comment was marked as abuse.

@peterwouda
Copy link

screenshot_error_banner

@peterwouda
Copy link

I do not have overrides in /html/com_banners

@PhilETaylor

This comment was marked as abuse.

@peterwouda
Copy link

OK, thanks! I will send it to you in about an hour or so. First I will recover the live-site.

@PhilETaylor

This comment was marked as abuse.

@alikon
Copy link
Contributor

alikon commented Oct 22, 2016

i'm unable to reproduce this issue under 3.6.3
bannere

finish publishing was changed via phpmyadmin cause you cant't set finish publishing < start publishing via banner edit

@PhilETaylor

This comment was marked as abuse.

zero-24 pushed a commit that referenced this issue Oct 23, 2016
…on (#12514)

* Ensure query is only run if items are found to avoid database exception

Pull Request for Issue #11969 and other fringe cases

Summary of Changes

This PR is the result of debugging on two live sites with deadly fatal exceptions as per #11969

On code review it was clear this code was low quality, running two loops when one would have done, and also causes issues where there were no items to update, but yet we still tried to execute a query when there were no items to increment impmade to.. this causes a deadly JDatabaseExceptionExecuting, rearranging the code block to only run if needed fixes the exception issue.

Testing Instructions

Find a site where you get the deadly issue reported - apply patch - see its fixed - check that banners impressions are still logged

* Just do it the way Im told...

* whitespace on gh
@peterwouda
Copy link

It works fine now, no exceptions after testing with adding and deleting
banners. Thanks!

Peter

Op 22-10-2016 om 15:03 schreef Phil Taylor:

I have raised a PR #12508
#12508 - that addresses a
code quality issue, that causes this exception, Please test this - I
have applied this on @peterwouda https://github.com/peterwouda site
and on another and it fixes both sites - its a fringe case to
replicate, but the code was of poor quality in this area anyway - the
PR makes it more reliable.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#11969 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ARfuknjXFXdJVNFPTpfgxzlpjMSlqKc9ks5q2gmbgaJpZM4J22h0.

@davenir
Copy link

davenir commented Oct 26, 2016

I just spent half a day attempting to sort this issue after upgrading to 3.6.4.
Creating a banner or (inexplicably)changing to default template sorted it.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11969.

@PhilETaylor

This comment was marked as abuse.

@davenir
Copy link

davenir commented Oct 26, 2016

No there were no overrides for banners. The theme was "University" by Gavick which I reinstalled again to see if this was the issue but the error persisted. Also no relevant apache errors. Switching theme removed the issues. Only when I finally disabled Gavick's custom error page and got a more verbose error was I able to actually view the specific error..which led me here..

Disabling the banner STILL causes the issue unless I switch to Beez or similar default theme. I can provide URL if you're curious.

@PhilETaylor

This comment was marked as abuse.

@davenir
Copy link

davenir commented Oct 26, 2016

No problem Phil - publishing a non-visible banner is as good a fix as I need for the moment!

@PhilETaylor

This comment was marked as abuse.

@davenir
Copy link

davenir commented Oct 26, 2016

Of course - I just meant that the site is online and working. I've added the site to myjoomla.com. ID: 11195130 if you're interested.

@PhilETaylor

This comment was marked as abuse.

@davenir
Copy link

davenir commented Oct 26, 2016

My apologies. I've submitted them as you did originally specify.

@PhilETaylor

This comment was marked as abuse.

@brianteeman
Copy link
Contributor

Closed as requested


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11969.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants