Removed deprecated method l from the module's code base

Comments

kpoornima created an issue. See original summary.

nathaniel’s picture

Status: Needs review » Needs work

Thanks for the effort. I'm getting several errors from the patch.

Example:

The website encountered an unexpected error. Please try again later.
Recoverable fatal error: Object of class Drupal\Core\Link could not be converted to string in _photos_order_link() (line 2343 of modules\photos\photos.module).

Also need to include:
use Drupal\Core\Link;

kpoornima’s picture

Status: Needs work » Needs review
StatusFileSize
new30.86 KB

Added use Drupal\Core\Link;

nathaniel’s picture

Status: Needs review » Needs work

This is still breaking the module. Please test the module before submitting a new patch.

Recoverable fatal error: Object of class Drupal\Core\Link could not be converted to string in _photos_order_link() (line 2345 of modules\photos\photos.module).
ahamayed’s picture

how to solve this error ?

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'u.name' in 'field list': SELECT p.*, f.uri AS uri, f.filemime AS filemime, f.created AS created, f.filename AS filename, f.filesize AS filesize, u.uid AS uid, u.name AS name FROM {file_managed} f INNER JOIN {photos_image} p ON p.fid = f.fid INNER JOIN {users} u ON u.uid = f.uid WHERE (p.pid = :db_condition_placeholder_0) ORDER BY p.count DESC LIMIT 10 OFFSET 0; Array ( [:db_condition_placeholder_0] => 50 ) in _photos_node_view() (line 585 of modules/photos/photos.module).
Drupal\Core\Database\Statement->execute(Array, Array) (Line: 610)
Drupal\Core\Database\Connection->query('SELECT p.*, f.uri AS uri, f.filemime AS filemime, f.created AS created, f.filename AS filename, f.filesize AS filesize, u.uid AS uid, u.name AS name
FROM
{file_managed} f
INNER JOIN {photos_image} p ON p.fid = f.fid
INNER JOIN {users} u ON u.uid = f.uid
WHERE (p.pid = :db_condition_placeholder_0)
ORDER BY p.count DESC
LIMIT 10 OFFSET 0', Array, Array) (Line: 81)
Drupal\Core\Database\Driver\mysql\Connection->query('SELECT p.*, f.uri AS uri, f.filemime AS filemime, f.created AS created, f.filename AS filename, f.filesize AS filesize, u.uid AS uid, u.name AS name
FROM
{file_managed} f
INNER JOIN {photos_image} p ON p.fid = f.fid
INNER JOIN {users} u ON u.uid = f.uid
WHERE (p.pid = :db_condition_placeholder_0)
ORDER BY p.count DESC
LIMIT 10 OFFSET 0', Array, Array) (Line: 508)
Drupal\Core\Database\Query\Select->execute() (Line: 585)
_photos_node_view(Object, 2, 'full') (Line: 442)
photos_node_view(Array, Object, Object, 'full')
call_user_func_array('photos_node_view', Array) (Line: 402)
Drupal\Core\Extension\ModuleHandler->invokeAll('node_view', Array) (Line: 252)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 203)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func(Array, Array) (Line: 376)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 62)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 652)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

nathaniel’s picture

Status: Needs work » Postponed
Related issues: +#2850882: Cleanup and refactoring

  • Nathaniel committed 96a904e on 8.x-4.x
    Issue #2765209 by kpoornima, Nathaniel: Removed deprecated method l from...
nathaniel’s picture

Assigned: kpoornima » Unassigned
Status: Postponed » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.