Keyword

Advanced Search

Search Results (Searched for: Re Error SQL)

  • Nick
  • Nick's Avatar
06 May 2011 12:49
Replied by Nick on topic ERROR JUser::_load:

ERROR JUser::_load:

Category: English K2 Community

use a query like this:

 

UPDATE table_name

SET user_id = 77

WHERE user_id = 64

 

you have to run this in phpmyadmin or your mysql admin back-end
  • Gary Grant
  • Gary Grant's Avatar
03 May 2011 16:35

utilties.php error only on front page (but...its the front page)

Category: English K2 Community

Getting the following:  Warning: preg_match() [function.preg-match]: Compilation failed: regular expression is too large at offset 20 in ...components\com_k2\helpers\utilities.php on line 74

 

utilities.php attached

 

Cant go live with this.

 

My configuration is:

 


Web Server
Apache/2.2.12 (Win32) DAV/2 mod_ssl/2.2.12 OpenSSL/0.9.8k mod_autoindex_color PHP/5.3.0 mod_perl/2.0.4 Perl/v5.10.0

PHP version
5.3.0

MySQL version
5.1.56-community

GD image library
2.0.35

Multibyte string support
Enabled

Upload limit
128M

Memory limit
128M

Open remote files (allow url fopen)
Yes
  • fjesteban
  • fjesteban's Avatar
26 Apr 2011 13:16

blog calendar doesn't pull from children categories

Category: English K2 Community

Dear Tomasso:

Your last post give me the cue: The URL is probably working right (you can test it by altering the date manually in it), but the date in the calendar is marked as linkable only if there are items in the parent category. You need an additional hack to fix it. Sorry for not giving it at first.

Here's the procedure:

1.- backup your <joomla_root>/modules/mod_k2_tools/helper.php
2.- Search for the class "MyCalendar". In my version it's at line 550
3.- The fuction getDateLink (lines 554 to 587 in my version) looks originally like this:
function getDateLink($day, $month, $year) {

$user = &JFactory::getUser();
$aid = $user->get('aid');
$db = &JFactory::getDBO();

$jnow = &JFactory::getDate();
$now = $jnow->toMySQL();
$nullDate = $db->getNullDate();

$query = "SELECT COUNT(*) FROM #__k2_items WHERE YEAR(created)={$year} AND MONTH(created)={$month} AND DAY(created)={$day} AND published=1 AND ( publish_up = ".$db->Quote($nullDate)." OR publish_up <= ".$db->Quote($now)." ) AND ( publish_down = ".$db->Quote($nullDate)." OR publish_down >= ".$db->Quote($now)." ) AND trash=0 AND access<={$aid} AND EXISTS(SELECT * FROM #__k2_categories WHERE id= #__k2_items.catid AND published=1 AND trash=0 AND access<={$aid})";

$catid = $this->category;
if ($catid > 0)
$query .= " AND catid={$catid}";

$db->setQuery($query);
$result = $db->loadResult();
if ($db->getErrorNum()) {
echo $db->stderr();
return false;
}

if ($result > 0) {
$itemID = JRequest::getInt('Itemid');
if ($catid > 0)
return JRoute::_('index.php?option=com_k2&view=itemlist&task=date&year='.$year.'&month='.$month.'&day='.$day.'&catid='.$catid.'&Itemid='.$itemID);
else
return JRoute::_('index.php?option=com_k2&view=itemlist&task=date&year='.$year.'&month='.$month.'&day='.$day.'&Itemid='.$itemID);

} else {
return false;
}
}

4.- And it should be replaced (the entire function) by the following code segment (it adds also the ability to resolve the whole month view with only one query to the database, so it renders 31 times faster) :

var $days_with_data = null;

function getMonthView($month, $year) {
$user = &JFactory::getUser();
$aid = $user->get('aid');
$db = &JFactory::getDBO();

$jnow = &JFactory::getDate();
$now = $jnow->toMySQL();
$nullDate = $db->getNullDate();

$query = "SELECT DISTINCT DAY(created) AS myday FROM #__k2_items WHERE YEAR(created)={$year} AND MONTH(created)={$month} AND published=1 AND ( publish_up = ".$db->Quote($nullDate)." OR publish_up <= ".$db->Quote($now)." ) AND ( publish_down = ".$db->Quote($nullDate)." OR publish_down >= ".$db->Quote($now)." ) AND trash=0 AND access<={$aid} AND EXISTS(SELECT * FROM #__k2_categories WHERE id= #__k2_items.catid AND published=1 AND trash=0 AND access<={$aid})";

$catid = $this->category;
if ($catid > 0) {
$categories = modK2ToolsHelper::getCategoryChildren($catid);
$categories[] = $catid;
$categories = @array_unique($categories);
$sql = @implode(',', $categories);
$query .= " AND catid IN ({$sql})";
}

$db->setQuery($query);
$this->days_with_data = $db->loadObjectList();
if ($db->getErrorNum()) {
echo $db->stderr();
}
return parent::getMonthView($month,$year);
}


function getDateLink($day, $month, $year) {
static $array = array();
$itemID = JRequest::getInt('Itemid');
foreach ($this->days_with_data as $day_with_data) {
array_push($array, $day_with_data->myday);
if ($day == $day_with_data->myday) {
$route='index.php?option=com_k2&view=itemlist&task=date&year={$year}&month={$month}&day={$day}";
if($this->category>0)
$route.="&catid={$this->category}";
return JRoute::_($route.'&Itemid='.$itemID);
} //if
} //foreach
return false;

}

And that's all. After this changes, your calendar should show the correct links, and it's also expected to appear faster (you can test it clicking on previous/next month). I've slightly modified the code before posting it to eliminate other hacks in my site. Please report back any problem you get.

Regards.
  • Yuriy Boev
  • Yuriy Boev's Avatar
18 Apr 2011 20:05

Internal Server Error after saving item, even without attached image

Category: English K2 Community

Hi all,

 

I know there are many threads regarding this problem, but I couldn't find any solution.

 

After saving changes to this: evroprogrami.com/minal-priem/myarka-312-podkrepa-za-sazdavane-i-razvitie-na-mikropredpriyatiya and many other articles I get Internal Server Error.

There are no images attached or else. Just plain text as you can see.

 

Changes to article body are committed, but I can't delete any Tag from this article.

 

The site is running:

 

Joomla 1.5.22,

PHP 5.2.12

MySQL 5.0.91

 

I have tried to increase PHP limits but still no success:

error_log=error_loglog_errors=Onerror_reporting = E_ALL & ~E_NOTICEexpose_php = Offmax_execution_time = 90set_time_limit = 0post_max_size = 100Mmax_input_time = 256memory_limit 128Moutput_buffering = Offsafe_mode=offvariables_order = "EGPCS"extension_dir = "./"

 

Thanks in advance for any help.
  • blue_Shift
  • blue_Shift's Avatar
11 Apr 2011 01:35
Replied by blue_Shift on topic mod_left disappears in category view

mod_left disappears in category view

Category: English K2 Community

Menu returns to the left, but now i've lost the K2 styling I've worked out.... and the read more jump is broken (I'm getting several lines of error code (see below)

 

(one change to your instrux, use {loadposition HomePage])

 

Error on 'Read More' jump

Error loading Modules:MySQL server has gone away SQL=SELECT id, title, module, position, content, showtitle, control, params FROM jos_modules AS m LEFT JOIN jos_modules_menu AS mm ON mm.moduleid = m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND ( mm.menuid = 28 OR mm.menuid = 0 ) ORDER BY position, ordering


 

blue_Shift said:

Not sure what you said... but when I scroll down to the bottom of the page, there is my left menu! At the bottom, below the column of article leads, not on the left. I run other JB templates, most of them with all the content in K2 - this is the outlier, with only the front page in K2. It is not specifically defined as a Joomla Bamboo 'front page.' William White said:Try creating a blank or mostly blank joomla article and setting it to front page. create a module com_k2_content, set its position to HomePage. Use a {loadposition FrontPage} in the blank joomla article to load the module in.

Also, check the joomlabamboo template for settings "content on front page" as some have settings about that
  • Miguel Feio
  • Miguel Feio's Avatar
05 Apr 2011 19:36

HELP PLEASE! Suddenly I'm getting 500 error page in all links!!!

Category: English K2 Community

Hello All,

 

I hope somebody can help me overcome this. I was setting up k2 and was, at the time, creating a menu link to category and when i refreshed the site to see the changes it gave me a 500 error - and then I saw it was in the whole site.

 

The error show is:

 

500 - No valid database connection: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 ') GROUP BY comments.itemID' at line 11 SQL=SELECT content.id AS id, COUNT(comments.itemID) AS count FROM jos_k2_items AS content LEFT JOIN jos_k2_comments AS comments ON comments.itemID = content.id WHERE comments.published AND ( ) GROUP BY comments.itemID ;

 

I've seen some of the explanations on the forum regarding the cache but that didn't worked. I'm not using JoomSEF - using Joomfish though - and have all the caching turned off.

 

Can somebody help please?

 

The website is rms.comunicate.com.pt

 

Thanks all in advance!

 
  • Edgar Carrera
  • Edgar Carrera's Avatar
29 Mar 2011 11:07

I am haveing issues can any onw tell me how to fix some of these issues.

Category: English K2 Community

Hello Simon...

 

Same case:

GROUP BY  comments.itemID' at line 11 SQL=SELECT  content.id AS id, COUNT(comments.itemID) AS count FROM  jos_k2_items AS content  LEFT JOIN  jos_k2_comments AS comments ON comments.itemID = content.id WHERE  comments.published AND (  )  GROUP BY  comments.itemID ; 500

  ---No valid database connection: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 ') GROUP BY comments.itemID' at line 11 SQL=SELECT content.id AS id, COUNT(comments.itemID) AS count FROM jos_k2_items AS content LEFT JOIN jos_k2_comments AS comments ON comments.itemID = content.id WHERE comments.published AND ( ) GROUP BY comments.itemID ;

 

I'm using last version 2.4.1 of K2. 3 K2 plugins installed and checked according the Information tab in dashboard of K2.

 

You can see the problem online here:

bestcancunescapes.com/index.php

 

this error occurs (use the URL), after installing Joomfish 2.1.6 ... You know why? Please help me!

If uninstall the joomfish componente all returns normal.

 

I hope your comments. Thanks!

 

Edgar
  • Edgar Carrera
  • Edgar Carrera's Avatar
26 Mar 2011 14:24
after installing Joomfish 2.1.6 was created by Edgar Carrera

after installing Joomfish 2.1.6

Category: English K2 Community

Hello Simon!

 

It's simple, everything was fine, suddenly, this error occurs (see image) after installingJoomfish ... You know why? Please! My site gets a small marketing campaign veryimportant next week hopefully, please help me...

 

About the erro code:

GROUP BY  comments.itemID' at line 11 SQL=SELECT  content.id AS id, COUNT(comments.itemID) AS count  FROM  jos_k2_items AS content  LEFT JOIN  jos_k2_comments AS comments ON comments.itemID = content.id  WHERE comments.published AND (  )  GROUP BY  comments.itemID ; 500


And this:

 

No valid database connection: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 ') GROUP BY comments.itemID' at line 11 SQL=SELECT content.id AS id, COUNT(comments.itemID) AS count FROM jos_k2_items AS content LEF



No valid database connection: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 ') GROUP BY comments.itemID' at line 11 SQL=SELECT content.id AS id, COUNT(comments.itemID) AS count FROM jos_k2_items AS content LEFT JOIN jos_k2_comments AS comments ON comments.itemID = content.id WHERE comments.published AND ( ) GROUP BY comments.itemID ;


 

These error you can see them in this URL: bestcancunescapes.com/index.php

 
  • Matthew Philogene
  • Matthew Philogene's Avatar
24 Mar 2011 23:08
Replied by Matthew Philogene on topic Search don't work in translated language (with Joomfish)

Search don't work in translated language (with Joomfish)

Category: English K2 Community

Hi Olivier

just tried this plugin on the following

 

J v 1.5.22

Joomfish v 2.1.0

K2 v 2.5 SVN

 

I get a massive sql error which is similar to one of the posts above.

 

Have you done any further updates to this plugin ?

regards

Matthew
  • Ajit Bohra
  • Ajit Bohra's Avatar
16 Mar 2011 17:32

500 internal server error on content import

Category: English K2 Community

JOOMLA: Version 1.5.22

K2: 2.4.1

MYSQL: 5.1.52

PHP: 5.2.15

 

Articles: 2570Sections: 4Categories: 12Users: 6762

 

Local backup: Page goes blank.

Live: 500 Internal server error [As website is on shared server we cannot get memory increased]

 

Is their any manual way to import joomla content to k2 or in small batch.

 

Trying to use the power of K2 to make joomla more lovable !
  • Helen Edwards
  • Helen Edwards's Avatar
12 Mar 2011 13:43
Replied by Helen Edwards on topic How to approve checked out items

How to approve checked out items

Category: English K2 Community

I am having the same problem.  and also getting this error.  I am going to delete my editor JCE, delete K2 and reinstall and see if I can get it too work.

 

500 - DB function failed with error number 1054Unknown column 'News' in 'where clause' SQL=SELECT * FROM `xjbh_content`  WHERE `created_by` = '64' AND `state`='1' AND `sectionid` IN (News) ORDER BY `created` DESC LIMIT 0,2
  • Steev J
  • Steev J's Avatar
03 Mar 2011 17:22

ERROR When No K2 Content Published On Component Page - JUser::_load: Unable to load user with id:

Category: English K2 Community

Thanks i eventually did find the SQL tab in phpmyadmin but thanks for your response !

For me tho, I had to update the ID in other tables aswell tho.
  • Wil Cleland
  • Wil Cleland's Avatar
03 Mar 2011 15:44

ERROR When No K2 Content Published On Component Page - JUser::_load: Unable to load user with id:

Category: English K2 Community

Steev J:

If you go to your MySQL database in PHPMyadmin you can navigate to the SQL Tab at the top of the Database view.

In the large white box insert the code above replacing the ID's appropriately.

 
  • Steev J
  • Steev J's Avatar
03 Mar 2011 00:09

ERROR When No K2 Content Published On Component Page - JUser::_load: Unable to load user with id:

Category: English K2 Community

where do u run tht sql command tho ?

my admin user has a id of 62

created a new user and then the id was 64 :/
  • Wil Cleland
  • Wil Cleland's Avatar
17 Feb 2011 16:38

ERROR When No K2 Content Published On Component Page - JUser::_load: Unable to load user with id:

Category: English K2 Community

I had the same issue when migrating an old Mambo site into Joomla 1.5x

Migrated the content using "ExportContent" component.

The issue didn't rear it's head until I imported all 500 articles into K2.

Once the import was complete however I started getting the exact error which I solved using the following SQL Query

 

UPDATE `jos_content` SET created_by = 62 WHERE created_by = 63

 

Whereas ID 62 is the NEW_ID and 63 was the OLD_ID
  • robert.woods
  • robert.woods's Avatar
13 Feb 2011 01:42
Error after front end save was created by robert.woods

Error after front end save

Category: English K2 Community

Most stuff seems to be working correctly (besides the occasional problem with category lists which I have mostly worked around).

 

The problem I seem to be having is that when editing in the frontend I save the changes to the item and I get and error come up in the box. The item saves correctly, you close the box and no harm done.

 

This is fine for me, but I need to have this available to a wider audience that it will scare/confuse.

 

The offending problem I would take to be the variable 'catid' not being passed properly as the error mentions the following SQL statement

SELECT id, ordering FROM jos_k2_items WHERE ordering>0 AND catid = AND trash = 0 ORDER BY ordering

 

And as you can see there is no value for 'catid'

 

Was just wondering if there is something in the way that I have configured it that could be causing this problem or if this is a bug.

 

Thanks

 

Rob
  • Vicky
  • Vicky's Avatar
04 Feb 2011 10:29

Problems installing k2 --> cannot create target folder

Category: English K2 Community

Hi,

 

I am trying to install K2 on my site. I get the error "-1 cannot create target folder".

 

I deleted all files, tried to install it again. It does not write tables into sql.

Since I cannot solve this prob I tried to install K2 manually. What a surprise... I didn´t work ;)

 

Maybe I have missed something. So I have two questions:

1. Is there a solution for this error when installing? I set the rights etc... but no change.

2. Can I install K2 manually? If so... HOW ??? Is there a doc out there that explains a manual installation?

 

THANKS VERY MUCH!

 

Vicky
  • stavroch
  • stavroch's Avatar
31 Jan 2011 21:30
Attachment file bug was created by stavroch

Attachment file bug

Category: English K2 Community

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 'AND published=1 AND trash=0 AND access<=0' at line 1 SQL=SELECT * FROM jos_k2_categories WHERE id= AND published=1 AND trash=0 AND access<=0/index.php?option=com_k2&view=item&task=download&id=6"> PressKitFin.pd
  • Tvrtko
  • Tvrtko's Avatar
12 Dec 2010 23:23

Blank URL's with K2 and sh404SEF on live site

Category: English K2 Community

Web server: Apache/1.3.42 (Unix)PHP version? 5.2.14 Database? MySQL? 5.1.48Joomla version? 1.5.20sh404SEF version? 2.1.8.777Artcile management: K2 2.4.1. (also tested it with K2 2.5 SVN)

 

After all worked perfectly on my local server, I uploaded web-site on the live server.

At the moment, on the live site sh404SEF is not generating any addresses for new K2 articles that I create (jos_redirection table in database dosen't record data for the new articles).All articles that where created on the local server have valid addresses, but new articles that are created on live server are shown in a category, but when I click on their title / read more I am transfered back to root address of the web site.

I wrote about my problems on sh404SEF forum [link]. Seven days has past and I'm still waiting for their response. Project that I am trying to finish is an internet magazine and I am really stuck with this because I can not get to show new articles which are written on daily bases.

 

1) Joomla is on maximum error reporting and there are no errors shown.2) I have turned off every sensitive component/module/plugin (JSecure, CssJsCompress) which could interfere with the URL's, but still nothing.3) when I turn off sh404SEF article links I have full URL and I can enter details view of the articles.

 

Do you have any advice how can I fix this problem?
  • Charles Middaugh
  • Charles Middaugh's Avatar
19 Nov 2010 18:25
Replied by Charles Middaugh on topic Delete all comments?

Delete all comments?

Category: English K2 Community

Thank you, Worked like a charm. At first I received an error when trying to refresh the website but after a few an hour of trying to restore the database, it was working without the 'cleaned out' comments. I have changed the security setting to post comments only after moderation, but since the spam is coming at a rate of about one per 3-5 seconds, it won't be long before I'm forced to do it again. Thank you William.


William White said:The simplest way to do this is with phpmyadmin/mysql. You should have your site backed up completely before you start. I just did this on one of my sites with success. If there are comments you want to keep it will be more difficult, but is still able to be done. Hopefully the good comments are not mixed up with the bad ones, this would require more work.
The table you will want to "clean out" is jos_k2_comments. If you are not familiar with mysql pm me for more info.
Displaying 641 - 660 out of 793 results.

Powered by Kunena Forum