6 to 7 upgrade brings Failed: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry

I have a couple of drupal sites up and running and I have not had to pay much attention to the databases until I tried to do an core upgrade from D6 to D7.

Here's the first part of the error message I received running update.php after a GUI/FTP replacement of version 6 files with version 7 files:

system module
Update #7007

"existing system path" and "path alias"

I'm learning more everyday in the Drupal world but something that seemed simple at the outset is confusing me.

I have this existing system path: node/5801

and the alias that is mapped to is: legal/important-restrictions

I have a page-node-5801.tpl.php template.

Within a block I have (edited to one example):

<ul id="footer_links_only">
<li class="lastItem"><a href="legal/important-restrictions">Important Restrictions</a></li>
</ul>

When I visit the page and click on the Important Restrictions link, the page-node-5801.tpl.php template is called and all seems ok.

However, if I click again on that Important Restrictions the url becomes:
/legal/legal/important-restrictions

so the "/legal" is getting repeated once the page has been visited.

Actually, once any link in that list is clicked, the remaining links get messed up either by getting the /legal/legal or in some cases, the url gets /node/node/legal.

Trying a different link using:
<li class="lastItem"><a href="node/5801">Important Restrictions</a></li>

Get's a page not found.

I'm trying to use a different template for a legal section. I could use css to hide and move content around but why load info only to hide it for good?

Autocomplete result not showing up

Hi,

I set up an autocomplete on a form using the form API. It is all set up correctly regarding the multiple example I found on the net. The autocomplete function returns JSON results correctly, but nothing shows up under the textfield.

Here is the code I use :

In the form

Users accesing my site with different A records

Hi everybody;

I've a strange problem that users can access my site via

www.mydomain.com
pop.mydomain.com
smtp.mydomain.com
mail.mydomain.com

I use boost module and I think it can be related with this because of this comment:
http://drupal.org/node/495290#comment-3376554

But I couldn't understand how can I solve this. Can someone help me?

Problem with the server

Hello

RULES - Sample code in php to restrict number of votes per day

I tried to set up a rule checking if a user has voted more than 2 times in the last 24 hours.
Unfortunately, I got errors and can't figure out how to make it work.
Here is the code I used in the validation section of the rules, adding some php code inside:

// Configure your settings:
$daily_limit = 2;
$content_type = 'node';
$day = strtotime(date('Y-m-d'))-1;

// Load the active user account
global $user;

// Drupal has a security feature called the Database Abstraction Layer.
// You have to build DB queries with variables that are defined in an array.
// Define the query string, where ":drupaluid" etc. are arbitrary placeholders

$query = 'SELECT * FROM votingapi_vote WHERE uid=:drupaluid AND content_type=:drupaltype AND timestamp > :day';

// Define each placeholder
$variables = array(':drupaluid' => $user->uid, ':drupaltype' => $content_type, ':day' => $day);

// Query the Drupal database
$result = db_query($query, $variables);

// Count the number of rows returned from the Drupal database
// From: http://api.drupal.org/api/drupal/includes%21database%21database.inc/function/db_query/7
$nodecount = $result->rowCount();

// Set the flag as to whether this Rule is effective or not
if ( $nodecount >= $daily_limit) {
return TRUE; // You will be over the accepted quota
} else {

Pages

Subscribe with RSS Subscribe to RSS - Drupal 6.x