Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
feeds
Commits
8c54da49
Commit
8c54da49
authored
14 years ago
by
Alex Barth
Browse files
Options
Downloads
Patches
Plain Diff
#755544 Monkey Master: Keep batch processing when mapping fails.
parent
40a8b894
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.txt
+1
-0
1 addition, 0 deletions
CHANGELOG.txt
plugins/FeedsNodeProcessor.inc
+15
-9
15 additions, 9 deletions
plugins/FeedsNodeProcessor.inc
with
16 additions
and
9 deletions
CHANGELOG.txt
+
1
−
0
View file @
8c54da49
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
Feeds 6.x 1.0 xxxxxxxxxxxxxxxxxxxx
Feeds 6.x 1.0 xxxxxxxxxxxxxxxxxxxx
----------------------------------
----------------------------------
- #755544 Monkey Master: Keep batch processing when mapping fails.
- alex_b: Reset import schedule after deleting items from feed.
- alex_b: Reset import schedule after deleting items from feed.
- #653412 rbrandon: Do not create items older than expiry time.
- #653412 rbrandon: Do not create items older than expiry time.
- #725392 nicholasThompson: FeedsBatch does not check feeds folder exists before
- #725392 nicholasThompson: FeedsBatch does not check feeds folder exists before
...
...
This diff is collapsed.
Click to expand it.
plugins/FeedsNodeProcessor.inc
+
15
−
9
View file @
8c54da49
...
@@ -41,10 +41,6 @@ class FeedsNodeProcessor extends FeedsProcessor {
...
@@ -41,10 +41,6 @@ class FeedsNodeProcessor extends FeedsProcessor {
// If updating populate nid and vid avoiding an expensive node_load().
// If updating populate nid and vid avoiding an expensive node_load().
$node
->
nid
=
$nid
;
$node
->
nid
=
$nid
;
$node
->
vid
=
db_result
(
db_query
(
"SELECT vid FROM
{
node
}
WHERE nid = %d"
,
$nid
));
$node
->
vid
=
db_result
(
db_query
(
"SELECT vid FROM
{
node
}
WHERE nid = %d"
,
$nid
));
$batch
->
updated
++
;
}
else
{
$batch
->
created
++
;
}
}
// Populate and prepare node object.
// Populate and prepare node object.
...
@@ -66,11 +62,21 @@ class FeedsNodeProcessor extends FeedsProcessor {
...
@@ -66,11 +62,21 @@ class FeedsNodeProcessor extends FeedsProcessor {
$node
->
log
=
'Created/updated by FeedsNodeProcessor'
;
$node
->
log
=
'Created/updated by FeedsNodeProcessor'
;
$node
->
uid
=
0
;
$node
->
uid
=
0
;
// Execute mappings from $item to $node.
// Map and save nodes. If errors occur don't stop but report them.
$this
->
map
(
$item
,
$node
);
try
{
$this
->
map
(
$item
,
$node
);
// Save the node.
node_save
(
$node
);
node_save
(
$node
);
if
(
!
empty
(
$nid
))
{
$batch
->
updated
++
;
}
else
{
$batch
->
created
++
;
}
}
catch
(
Exception
$e
)
{
drupal_set_message
(
$e
->
getMessage
(),
'warning'
);
watchdog
(
'feeds'
,
$e
->
getMessage
(),
array
(),
WATCHDOG_WARNING
);
}
}
}
$processed
++
;
$processed
++
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment