?
avatar JamalTailored
JamalTailored
7 Sep 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

Votes

# of Users Experiencing Issue
2/2
Average Importance Score
3.50

avatar JamalTailored JamalTailored - open - 7 Sep 2016
avatar JamalTailored JamalTailored - change - 7 Sep 2016
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 7 Sep 2016
Labels Added: ?
avatar brianteeman
brianteeman - comment - 7 Sep 2016

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.

avatar brianteeman brianteeman - change - 7 Sep 2016
Category MS SQL SQL
avatar brianteeman
brianteeman - comment - 7 Sep 2016

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

avatar JamalTailored
JamalTailored - comment - 7 Sep 2016

I have manually edited time in past.


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

avatar brianteeman
brianteeman - comment - 9 Oct 2016

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.

avatar brianteeman brianteeman - change - 9 Oct 2016
Status New Information Required
avatar PhilETaylor
PhilETaylor - comment - 20 Oct 2016

This has something to do with timezones. I believe there is a fringe case still a problem in 3.6.3, and I have at least one other customer with it at the moment, Im waiting for their site logins to look myself deeper.

What EXACT timezone are you using in Joomla Global Config

What EXACT time are you testing your site at (including where are you physically in the world, and whats your computer time/date at that time of testing)

What EXACT times are you inputting for the start/finishing times

ref: PR #11978 #11929

avatar PhilETaylor
PhilETaylor - comment - 20 Oct 2016

scratch that - I unpublished all banners and still I get the 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 ()

I'll have to wait for the FTP details from the client to debug whats going on.

avatar peterwouda
peterwouda - comment - 21 Oct 2016

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.

avatar PhilETaylor
PhilETaylor - comment - 21 Oct 2016

Funny you should say that you dont use banners, because when I trashed all the banners on this customers site, I still got the sql error too... which is strange. I did check caching was off...

I still dont have access to that customers site to debug this, waiting on FTP details, their site is still down because of it.

@peterwouda do you have a screenshot of the error? was it just the error? or a formatted page? did it mention jos-Error or not? Do you have any template overides in your /templates/[templatename]/html/com_banners/ ?

avatar peterwouda
peterwouda - comment - 21 Oct 2016

screenshot_error_banner

avatar peterwouda
peterwouda - comment - 21 Oct 2016

I do not have overrides in /html/com_banners

avatar PhilETaylor
PhilETaylor - comment - 21 Oct 2016

Thanks.
It would help nail this issue down if I could get access to play with your site later on tonight (UK Time) if that were at all possible. I understand if you do not wish to provide access, however there is obviously an issue that needs identifying and the easiest way is for an experienced developer to debug on a site that can replicate the issue time and time again.

Please send me your site details using the form at https://fix.myjoomla.com/now and I'll take a look as soon as I can. There is no charge for this at all and your details will be encrypted and only used for the above purpose.

avatar peterwouda
peterwouda - comment - 21 Oct 2016

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

avatar PhilETaylor
PhilETaylor - comment - 21 Oct 2016

Excellent - Im travelling all day anyway (at an airport now) so there is no rush - if you can provide exact details on how to replicate the issue (and how to remove the issue on your live site, I think you said by adding a dummy banner) in the secure form when submitting the details as I need to see it "broken" and with the error message in order to debug the problem.

avatar alikon
alikon - comment - 22 Oct 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

avatar PhilETaylor
PhilETaylor - comment - 22 Oct 2016

I have raised a PR #12508 - that addresses a code quality issue, that causes this exception, Please test this - I have applied this on @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.

avatar PhilETaylor PhilETaylor - reference | 244cace - 22 Oct 16
avatar zero-24 zero-24 - reference | 1c05f0c - 23 Oct 16
avatar peterwouda
peterwouda - comment - 25 Oct 2016

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.

avatar davenir
davenir - comment - 26 Oct 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.

avatar PhilETaylor
PhilETaylor - comment - 26 Oct 2016

So does that mean you were using a custom template? Do you/did you have any custom template overrides for com_banners in your templates html folder?

avatar davenir
davenir - comment - 26 Oct 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.

avatar PhilETaylor
PhilETaylor - comment - 26 Oct 2016

the fact that changing themes fixes this issue, means that its highly likely to be a theme override of sorts.

Im manic busy today but if you want to provide your site details securely at https://fix.myjoomla.com/now I'll take a quick look at your site to see if we can further nail this down - there is no charge, and no commitment - this is not official support, Im just looking to nail the issue down

Please also see the workaround in #12508 which will fix the issue for you, but is not the best practice fix, more a belt and braces thing we can add in core.

avatar davenir
davenir - comment - 26 Oct 2016

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

avatar PhilETaylor
PhilETaylor - comment - 26 Oct 2016

I understand you needed a quick fix to get your siteonline, but providing a broken site as a test site for someone like me to replicate the issue every time is invaluable in debugging the root cause of the issue so it can be identified and fixed for the good of everyone - even if its not a Joomla core issue we can then put this to bed.

avatar davenir
davenir - comment - 26 Oct 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.

avatar PhilETaylor
PhilETaylor - comment - 26 Oct 2016

that doesnt help me sorry - I need FTP access to debug this issue :)

avatar davenir
davenir - comment - 26 Oct 2016

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

avatar PhilETaylor PhilETaylor - reference | 7ea3a7b - 6 Nov 16
avatar PhilETaylor
PhilETaylor - comment - 20 Nov 2016

Fixed with PR #12514 for 3.7 - Please close this @brianteeman

avatar brianteeman
brianteeman - comment - 20 Nov 2016

Closed as requested


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

avatar brianteeman brianteeman - change - 20 Nov 2016
The description was changed
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2016-11-20 10:01:40
Closed_By brianteeman
avatar brianteeman brianteeman - change - 20 Nov 2016
The description was changed
avatar brianteeman brianteeman - close - 20 Nov 2016
avatar brianteeman brianteeman - edited - 20 Nov 2016

Add a Comment

Login with GitHub to post a comment